- Issue created by @hktang
- 🇺🇸United States josh.stewart Lexington, KY
Confirming I'm running into this issue as well.
- 🇺🇸United States josh.stewart Lexington, KY
I downgraded to algolia/algoliasearch-client-php:3.3.2 to resolve the issue. The implementation of typing is not lining up with the UriInterface declaration. I'm okay to do this for now. Doesn't seem like a problem for this module, but moreso with the UriInterface.
- 🇺🇸United States millerrs
I bumped into the same problem (Drupal 9.5.10/PHP 8.1). Just like josh.stewart, switching to 3.3.x sorted it out for me. Here's how I did it:
composer require algolia/algoliasearch-client-php:~3.3.2
The culprit behind the need to roll back is the psr/http-message dependency. From what I can tell, Drupal 9.5x blocks updating to a version that would fix this.
- 🇬🇧United Kingdom hdotnet
Same here, but in cron, downgrading the algolia search client to 3.3.2 fixes it
[INFO] [cron] [2023-09-07T10:32:56] Starting execution of search_api_cron(), execution of purge_processor_cron_cron() took 39.31ms. | uid: 0 | request-uri: http://default/ | refer: | ip: 127.0.0.1 | link: PHP Fatal error: Declaration of Algolia\AlgoliaSearch\Http\Psr7\Uri::withScheme(string $scheme): Psr\Http\Message\UriInterface must be compatible with Psr\Http\Message\UriInterface::withScheme($scheme) in /var/www/vendor/algolia/algoliasearch-client-php/src/Http/Psr7/Uri.php on line 439 [warning] Drush command terminated abnormally.
- 🇦🇹Austria kevin.pfeifer
We just updated algolia/algoliasearch-client-php from 3.3.2 to 3.4.0 and this error appears.
- 🇬🇧United Kingdom MrDaleSmith
Yeah the error is caused by an update to the client to v3.4, which according to https://github.com/algolia/algoliasearch-client-php/issues/720 is not an official or supported release yet. This might require a more specific version constraint in this module to prevent the error.
- 🇧🇪Belgium dieterholvoet Brussels
This fixed the issue for me, without needing to lock a specific version of
algolia/algoliasearch-client-php
:composer remove drupal/core-recommended
(make suredrupal/core
is installed instead)composer update algolia/algoliasearch-client-php psr/http-message
Looks like this issue is only present in Drupal 9:
drupal/core-recommended:9.5.11
has a dependency onpsr/http-message:~1.0.1
, Drupal 10 does not have a dependency onpsr/http-message
.The best solution to me seems to add a
conflict
onalgolia/algoliasearch-client-php:>3.3.2
to composer.json, and to remove it again once a release of this module comes out that drops support for Drupal 9. - Status changed to Needs review
10 months ago 1:34pm 29 January 2024 - 🇮🇳India nikunjkotecha India, Gujarat, Rajkot
Will create 4.x for git clone git@git.drupal.org:project/mobile_app_links.git
Will merge this in 3.x - Status changed to Closed: won't fix
about 2 months ago 7:36am 30 September 2024 - 🇮🇳India nikunjkotecha India, Gujarat, Rajkot
Wrong project in previous comment
Considering workaround is possible in 9.x as explained in https://www.drupal.org/project/search_api_algolia/issues/3381297 🐛 Algolia Library Version Active and 9.x is no longer supported I am inclined towards not doing any fix for this.