Skip to content

[bug]: guzzlehttp/psr7 constraint (^2.0) prevents clean installation on modern Laravel applications #762

Description

@hawkiq

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions