Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redundant composer dependencies #11

Open
someson opened this issue Sep 4, 2024 · 0 comments
Open

redundant composer dependencies #11

someson opened this issue Sep 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@someson
Copy link

someson commented Sep 4, 2024

Describe the bug

"require": {
    "php": ">=8.2",
    "ext-json": "*",
    "guzzlehttp/psr7": "^2.3",
    "guzzlehttp/guzzle": "^7.4",
    "symfony/service-contracts": "3.0.2",
    "symfony/event-dispatcher-contracts": "3.0.2",
    "symfony/deprecation-contracts": "3.0.2",
    "symfony/string": "6.0.10"
  }

guzzlehttp/guzzle has an internal dependency of guzzlehttp/psr7, so we could eventually drop guzzlehttp/psr7
because of:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - lvieira/arangodb-php-odm[v1.0.0, ..., v1.2.0, v2.0.0, ..., v2.1.0] require guzzlehttp/psr7 ^1.5 -> found guzzlehttp/psr7[1.5.0, ..., 1.9.1] but the package is fixed to 2.7.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.
    - lvieira/arangodb-php-odm[v3.11.0, ..., v3.12.0] require symfony/service-contracts 3.0.2 -> found symfony/service-contracts[v3.0.2] but the package is fixed to v3.5.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.
    - Root composer.json requires lvieira/arangodb-php-odm * -> satisfiable by lvieira/arangodb-php-odm[v1.0.0, ..., v1.2.0, v2.0.0, v2.1.0, v3.11.0, v3.12.0].

Also you can see the same problem with symfony/deprecation-contracts, which is a dependency of the very old package symfony/service-contracts, what could eventually also be dropped. Not to mention the choice to use the exact version number of a package instead of allowing non-breaking updates (see composer versions).

All the mentioned above is eventually wrong if you really need all the restrictions, what generally excludes the majority of users.

Expected behavior

No composer conflicts.

Environment (please complete the following information):

  • OS: Ubuntu 22
  • PHP version: 8.2
  • ArangoDB server version: 3.12.2
  • ArangoDB PHP ODM version: 3.12.0

Additional context

Can you slim down the composer.json to smth. like

"require": {
    "php": ">=8.2",
    "ext-json": "*",
    "guzzlehttp/guzzle": "^7.4",
    "symfony/service-contracts": "^3",
    "symfony/event-dispatcher-contracts": "^3",
    "symfony/string": "^7"
  }

?

@someson someson added the bug Something isn't working label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant