SoliDry / api-generator

PHP-code generator for Laravel framework, with complete support of JSON-API data format
MIT License
328 stars 60 forks source link

Composer conflict symfony/yaml conflict in Laravel 10.x #207

Open patramsey opened 1 year ago

patramsey commented 1 year ago

Describe the bug After a new install of Laravel 10.x the required

composer require solidry/api-generator

fails due to a composer conflict with symfony/yaml.

To Reproduce Steps to reproduce the behavior:

  1. composer create-project --prefer-dist laravel/laravel your_app
  2. composer require solidry/api-generator
  3. See error
./composer.json has been updated
Running composer update solidry/api-generator
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - solidry/api-generator[2.1.2, ..., 2.6.15] require raml-org/raml-php-parser ^4.1 -> satisfiable by raml-org/raml-php-parser[4.1.0, ..., v4.8.1].
    - solidry/api-generator[0.1.1, ..., 0.12.5, 1.3.1, ..., 1.8.3] require php ^7.0 -> your php version (8.2.11) does not satisfy that requirement.
    - solidry/api-generator[1.8.4, ..., 1.9.41, 2.0.1, ..., 2.1.1] require php ^7.1 -> your php version (8.2.11) does not satisfy that requirement.
    - solidry/api-generator[2.6.0, ..., 2.6.7] require illuminate/container ^5.8 -> found illuminate/container[v5.8.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
    - solidry/api-generator[2.6.8, ..., 2.6.11] require illuminate/container ^5.8|^6.0 -> found illuminate/container[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - raml-org/raml-php-parser[4.1.0, ..., 4.2.0] require symfony/yaml ~3.0|~4.0 -> found symfony/yaml[v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.45] but the package is fixed to v6.3.3 (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.
    - raml-org/raml-php-parser[v4.3.0, ..., v4.7.0] require php ^5.6|^7.0 -> your php version (8.2.11) does not satisfy that requirement.
    - raml-org/raml-php-parser[v4.8.0, ..., v4.8.1] require symfony/yaml ^3.0|^4.0|^5.0 -> found symfony/yaml[v3.0.0, ..., v3.4.47, v4.0.0, ..., v4.4.45, v5.0.0, ..., v5.4.23] but the package is fixed to v6.3.3 (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 solidry/api-generator * -> satisfiable by solidry/api-generator[0.1.1, ..., 0.12.5, 1.3.1, ..., 1.9.41, 2.0.1, ..., 2.6.15].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require solidry/api-generator:*" to figure out if any version is installable, or "composer require solidry/api-generator:^2.1" if you know which you need.

Expected behavior I would expect the composer require solidry/api-generator to not error.

Screenshots See attached. Screenshot 2023-10-26 at 10 24 06

arthurkushman commented 1 year ago

Sorry, but I'm not writing php code more than 5 years at this moment, because have work and projects that are written in Go.

The only thing I can help with is to merge someone's PR and consult in some way or another.

Thank u for posting this issue.

Hope there will be some guys who can help with this problem.