Skip to content

redundant composer dependencies #11

@someson

Description

@someson

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"
  }

?

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions