Description
When trying to install algolia/algoliasearch-client-php into a modern Laravel application following the official Laravel Scout documentation (composer require algolia/algoliasearch-client-php), Composer fails with a dependency resolution error.
To Reproduce
- Create a modern Laravel application (
guzzlehttp/psr7 is locked to ^3.0).
- Run composer require
algolia/algoliasearch-client-php.
- Composer fails with:
algolia/algoliasearch-client-php[4.0.0, ..., 4.47.0] require guzzlehttp/psr7 ^2.0 -> found guzzlehttp/psr7[2.0.0, ..., 2.13.0] but the package is fixed to 3.0.0 (lock file version)
Expected behavior
The package should install cleanly out-of-the-box without requiring developers to pass the --with-all-dependencies (-W) flag or force-downgrade PSR-7 packages.
Suggested Fix
Update composer.json requirements to support guzzlehttp/psr7: ^2.0 || ^3.0.
Client
All
Version
4.47
Relevant log output
Problem 1
- Root composer.json requires algolia/algoliasearch-client-php ^4.0 -> satisfiable by algolia/algoliasearch-client-php[4.0.0, ..., 4.47.0].
- algolia/algoliasearch-client-php[4.0.0, ..., 4.47.0] require guzzlehttp/psr7 ^2.0 -> found guzzlehttp/psr7[2.0.0, ..., 2.13.0] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Description
When trying to install
algolia/algoliasearch-client-phpinto a modern Laravel application following the official Laravel Scout documentation (composer require algolia/algoliasearch-client-php), Composer fails with a dependency resolution error.To Reproduce
guzzlehttp/psr7is locked to^3.0).algolia/algoliasearch-client-php.Expected behavior
The package should install cleanly out-of-the-box without requiring developers to pass the
--with-all-dependencies(-W) flag orforce-downgradePSR-7 packages.Suggested Fix
Update composer.json requirements to support
guzzlehttp/psr7: ^2.0 || ^3.0.Client
All
Version
4.47
Relevant log output
Problem 1 - Root composer.json requires algolia/algoliasearch-client-php ^4.0 -> satisfiable by algolia/algoliasearch-client-php[4.0.0, ..., 4.47.0]. - algolia/algoliasearch-client-php[4.0.0, ..., 4.47.0] require guzzlehttp/psr7 ^2.0 -> found guzzlehttp/psr7[2.0.0, ..., 2.13.0] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.