Codeception / module-yii2

Codeception module for Yii2 framework
MIT License
17 stars 35 forks source link

PHP version requirement contradiction. #105

Closed neoacevedo closed 1 month ago

neoacevedo commented 2 months ago

There is a contradiction in the dependences:

codeception/module-yii2[1.1.0, ..., 1.1.1] require php >=5.6.0 <8.0 -> your php version (8.0.8) does not satisfy that requirement. codeception/lib-innerbrowser[4.0.0, ..., 4.0.3] require php ^8.1 -> your php version (8.0.8) does not satisfy that requirement.

The module itself requires a PHP < 8.0 but its dependence, lib-innerbrowser requires a version >= 8.1

I'm trying to install this module in the yii2 app basic template, but the PHP version requirement is weird. If I try with PHP >= 8.0 the results are the same.

Using version ^1.1 for codeception/module-yii2
./composer.json has been updated
Running composer update codeception/module-yii2
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - codeception/module-yii2[1.1.6, ..., 1.1.7] require codeception/lib-innerbrowser ^3.0 -> satisfiable by codeception/lib-innerbrowser[3.0.0, ..., 3.1.3].
    - codeception/module-yii2[1.1.8, ..., 1.1.10] require codeception/lib-innerbrowser ^3.0 | ^4.0 -> satisfiable by codeception/lib-innerbrowser[3.0.0, ..., 3.1.3, 4.0.0, 4.0.1, 4.0.2, 4.0.3].
    - codeception/module-yii2[1.1.0, ..., 1.1.1] require php >=5.6.0 <8.0 -> your php version (8.0.8) does not satisfy that requirement.
    - codeception/module-yii2[1.1.2, ..., 1.1.5] require codeception/codeception ^4.0 -> found codeception/codeception[4.0.0, ..., 4.2.2] but it conflicts with your root composer.json require (^5.1).
    - codeception/lib-innerbrowser 3.0.0 requires symfony/browser-kit ^4.4 || ^5.4 || ^6.0 -> found symfony/browser-kit[v4.4.0, ..., v4.4.44, v5.4.0, ..., v5.4.40, v6.0.0, ..., v6.4.8] but it conflicts with your root composer.json require (>=2.7 <=4.2.4).
    - codeception/lib-innerbrowser[3.0.1, ..., 3.1.3] require symfony/browser-kit ^4.4.24 || ^5.4 || ^6.0 -> found symfony/browser-kit[v4.4.24, ..., v4.4.44, v5.4.0, ..., v5.4.40, v6.0.0, ..., v6.4.8] but it conflicts with your root composer.json require (>=2.7 <=4.2.4).
    - codeception/lib-innerbrowser[4.0.0, ..., 4.0.3] require php ^8.1 -> your php version (8.0.8) does not satisfy that requirement.
    - Root composer.json requires codeception/module-yii2 ^1.1 -> satisfiable by codeception/module-yii2[1.1.0, ..., 1.1.10].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
samdark commented 2 months ago

@neoacevedo do you have time to do a pull request correcting versions? Thanks.

Naktibalda commented 2 months ago

Your project has requirement for an old version of symfony/browser-kit

found symfony/browser-kit[v4.4.24, ..., v4.4.44, v5.4.0, ..., v5.4.40, v6.0.0, ..., v6.4.8] but it conflicts with your root composer.json require (>=2.7 <=4.2.4).

Naktibalda commented 2 months ago

Oh, it comes from very interesting version constraint in basic template

"symfony/browser-kit": "^6.0 || >=2.7 <=4.2.4"

back to @samdark

neoacevedo commented 2 months ago

@neoacevedo do you have time to do a pull request correcting versions? Thanks.

I will try but I'm so noob on it.

Naktibalda commented 2 months ago

@neoacevedo If you haven't figured it out yet, my advice is to completely remove symfony/browser-kit from composer.json of your project.

neoacevedo commented 2 months ago

Interesting, that symfony package is the root cause.

samdark commented 2 months ago

Interesting, that symfony package is the root cause.

It is caused by composer.json in Yii2's basic/advanced templates. Fix is as @Naktibalda suggested.

samdark commented 1 month ago

https://github.com/yiisoft/yii2-app-basic/commit/510f0e24ade3fbc0e926e1e86d8cb78adaa2a1b0 and https://github.com/yiisoft/yii2-app-advanced/commit/386378f2e276621081b76fd43a3f0daefd66b8fa