codeception error requires symfony/console >=2.7 <4.0 #3243

Closed
ZamanOof opened this Issue Jun 19, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@ZamanOof

when try install codeception/codeception at my laravel project show as below :

`composer require codeception/codeception --dev
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^2.2 for codeception/codeception
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don't install codeception/codeception 2.2.1
- Conclusion: remove symfony/console v2.6.13
- Installation request for codeception/codeception ^2.2 -> satisfiable by codeception/codeception[2.2.0, 2.2.1].
- Conclusion: don't install symfony/console v2.6.13
- codeception/codeception 2.2.0 requires symfony/console >=2.7 <4.0 -> satisfiable by symfony/console[v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.1.0, v3.1.1].
- Can only install one of: symfony/console[v2.7.0, v2.6.13].
- Can only install one of: symfony/console[v2.7.1, v2.6.13].
- Can only install one of: symfony/console[v2.7.10, v2.6.13].
- Can only install one of: symfony/console[v2.7.11, v2.6.13].
- Can only install one of: symfony/console[v2.7.12, v2.6.13].
- Can only install one of: symfony/console[v2.7.13, v2.6.13].
- Can only install one of: symfony/console[v2.7.14, v2.6.13].
- Can only install one of: symfony/console[v2.7.2, v2.6.13].
- Can only install one of: symfony/console[v2.7.3, v2.6.13].
- Can only install one of: symfony/console[v2.7.4, v2.6.13].
- Can only install one of: symfony/console[v2.7.5, v2.6.13].
- Can only install one of: symfony/console[v2.7.6, v2.6.13].
- Can only install one of: symfony/console[v2.7.7, v2.6.13].
- Can only install one of: symfony/console[v2.7.8, v2.6.13].
- Can only install one of: symfony/console[v2.7.9, v2.6.13].
- Can only install one of: symfony/console[v2.8.0, v2.6.13].
- Can only install one of: symfony/console[v2.8.1, v2.6.13].
- Can only install one of: symfony/console[v2.8.2, v2.6.13].
- Can only install one of: symfony/console[v2.8.3, v2.6.13].
- Can only install one of: symfony/console[v2.8.4, v2.6.13].
- Can only install one of: symfony/console[v2.8.5, v2.6.13].
- Can only install one of: symfony/console[v2.8.6, v2.6.13].
- Can only install one of: symfony/console[v2.8.7, v2.6.13].
- Can only install one of: symfony/console[v3.0.0, v2.6.13].
- Can only install one of: symfony/console[v3.0.1, v2.6.13].
- Can only install one of: symfony/console[v3.0.2, v2.6.13].
- Can only install one of: symfony/console[v3.0.3, v2.6.13].
- Can only install one of: symfony/console[v3.0.4, v2.6.13].
- Can only install one of: symfony/console[v3.0.5, v2.6.13].
- Can only install one of: symfony/console[v3.0.6, v2.6.13].
- Can only install one of: symfony/console[v3.0.7, v2.6.13].
- Can only install one of: symfony/console[v3.1.0, v2.6.13].
- Can only install one of: symfony/console[v3.1.1, v2.6.13].
- Installation request for symfony/console (locked at v2.6.13) -> satisfiable by symfony/console[v2.6.13].

Installation failed, reverting ./composer.json to its original content.
`

and composer file :

{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "laravel/framework": "5.0.*", "laracasts/commander": "^1.4", "laracasts/testdummy": "^2.3" }, "require-dev": { "phpunit/phpunit": "*", "phpspec/phpspec": "~2.1", "laracasts/generators": "^1.1" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "classmap": [ "tests/TestCase.php" ] }, "scripts": { "post-install-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-update-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php -r \"copy('.env.example', '.env');\"", "php artisan key:generate" ] }, "config": { "preferred-install": "dist" } }
I Try at another project there wasn't problem .

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jun 19, 2016

Member

@janhenkgerritsen Please explain why we no longer support Laravel 5.0 in Codeception 2.2.

Member

Naktibalda commented Jun 19, 2016

@janhenkgerritsen Please explain why we no longer support Laravel 5.0 in Codeception 2.2.

@ZamanOof

This comment has been minimized.

Show comment
Hide comment
@ZamanOof

ZamanOof Jun 19, 2016

i try laravel 5.1.0 show this error:
`composer require codeception/codeception --dev
Using version ^2.2 for codeception/codeception
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

  • Installing behat/gherkin (v4.4.1)
    Downloading: 100%
  • Installing symfony/browser-kit (v2.8.7)
    Downloading: 100%
  • Installing psr/http-message (1.0)
    Downloading: 100%
  • Installing guzzlehttp/psr7 (1.3.0)
    Downloading: 100%
  • Installing guzzlehttp/promises (1.2.0)
    Downloading: 100%
  • Installing guzzlehttp/guzzle (6.2.0)
    Downloading: 100%
  • Installing facebook/webdriver (1.1.1)
    Downloading: 100%
  • Installing codeception/codeception (2.2.1)
    Downloading: 100%

facebook/webdriver suggests installing phpdocumentor/phpdocumentor (2.*)
codeception/codeception suggests installing codeception/specify (BDD-style code blocks)
codeception/codeception suggests installing codeception/verify (BDD-style assertions)
codeception/codeception suggests installing flow/jsonpath (For using JSONPath in REST module)
codeception/codeception suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
codeception/codeception suggests installing league/factory-muffin (For DataFactory module)
codeception/codeception suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/codeception suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files

Installation failed, reverting ./composer.json to its original content.

[RuntimeException]
Could not scan for classes inside "database" which does not appear to be a
file nor a folder

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

`

i try laravel 5.1.0 show this error:
`composer require codeception/codeception --dev
Using version ^2.2 for codeception/codeception
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

  • Installing behat/gherkin (v4.4.1)
    Downloading: 100%
  • Installing symfony/browser-kit (v2.8.7)
    Downloading: 100%
  • Installing psr/http-message (1.0)
    Downloading: 100%
  • Installing guzzlehttp/psr7 (1.3.0)
    Downloading: 100%
  • Installing guzzlehttp/promises (1.2.0)
    Downloading: 100%
  • Installing guzzlehttp/guzzle (6.2.0)
    Downloading: 100%
  • Installing facebook/webdriver (1.1.1)
    Downloading: 100%
  • Installing codeception/codeception (2.2.1)
    Downloading: 100%

facebook/webdriver suggests installing phpdocumentor/phpdocumentor (2.*)
codeception/codeception suggests installing codeception/specify (BDD-style code blocks)
codeception/codeception suggests installing codeception/verify (BDD-style assertions)
codeception/codeception suggests installing flow/jsonpath (For using JSONPath in REST module)
codeception/codeception suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
codeception/codeception suggests installing league/factory-muffin (For DataFactory module)
codeception/codeception suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/codeception suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files

Installation failed, reverting ./composer.json to its original content.

[RuntimeException]
Could not scan for classes inside "database" which does not appear to be a
file nor a folder

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

`

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Jun 20, 2016

Member

What is that database?

Member

Naktibalda commented Jun 20, 2016

What is that database?

@janhenkgerritsen

This comment has been minimized.

Show comment
Hide comment
@janhenkgerritsen

janhenkgerritsen Jun 20, 2016

Contributor

Laravel 5.0 requires Symfony components 2.6, while Codeception 2.2 requires Symfony components 2.7 or higher.

I just tried a clean install of Laravel 5.0 and Codeception 2.2. The first problem I ran into is that Laravel 5.0 does not support PHP 7. After switching to PHP 5.6 the installation of Laravel 5.0 worked. But after running composer require codeception/codeception=2.2.* I got the following composer error:

  Problem 1
    - Conclusion: don't install phpunit/phpunit 4.8.26
    - Conclusion: don't install phpunit/phpunit 4.8.25
    - Conclusion: don't install phpunit/phpunit 4.8.24
    - Conclusion: don't install phpunit/phpunit 4.8.23
    - Installation request for phpunit/phpunit (locked at 4.5.0, required as ~4.0) -> satisfiable by phpunit/phpunit[4.5.0].
    - Conclusion: don't install phpunit/phpunit 4.8.22
    - codeception/codeception 2.2.0 requires phpunit/phpunit >4.8.20 <6.0 -> satisfiable by phpunit/phpunit[4.8.21, 4.8.22, 4.8.23, 4.8.24, 4.8.25, 4.8.26].
    - codeception/codeception 2.2.1 requires phpunit/phpunit >4.8.20 <5.5 -> satisfiable by phpunit/phpunit[4.8.21, 4.8.22, 4.8.23, 4.8.24, 4.8.25, 4.8.26].
    - Conclusion: don't install phpunit/phpunit 4.8.21
    - Installation request for codeception/codeception 2.2.* -> satisfiable by codeception/codeception[2.2.0, 2.2.1].

So there also seems to be a problem with the PHPUnit requirements. Laravel 5.0 requires PHPUnit ~4.0 and Codeception 2.2 requires PHPUnit >4.8.20 <5.5, so there probably is a conflict with another dependency of Laravel 5.0.

So it doesn't look like we can simply fix Laravel 5.0 support by allowing Symfony components 2.6, if it even is possible to lower the Symfony components version for Codeception 2.2.

I also did a clean install of Laravel 5.1 and Codeception 2.2 and that ran without problems. Laravel also has very clear upgrade instructions to migrate from 5.0 to 5.1. So if you would like to use Codeception 2.2 with an old Laravel 5.0 application you should probably just upgrade to Laravel 5.1, which also is a LTS release.

I can mention this in the docs of the Laravel module and also add it to the Changelog for the 2.2 release if you guys agree with me. And what do you think @DavertMik?

As for the error about the database, Laravel 5.1 has a database directory in the root of the application which was located at app/database in 5.0. Did you follow the upgrade instructions at https://laravel.com/docs/master/upgrade?

Contributor

janhenkgerritsen commented Jun 20, 2016

Laravel 5.0 requires Symfony components 2.6, while Codeception 2.2 requires Symfony components 2.7 or higher.

I just tried a clean install of Laravel 5.0 and Codeception 2.2. The first problem I ran into is that Laravel 5.0 does not support PHP 7. After switching to PHP 5.6 the installation of Laravel 5.0 worked. But after running composer require codeception/codeception=2.2.* I got the following composer error:

  Problem 1
    - Conclusion: don't install phpunit/phpunit 4.8.26
    - Conclusion: don't install phpunit/phpunit 4.8.25
    - Conclusion: don't install phpunit/phpunit 4.8.24
    - Conclusion: don't install phpunit/phpunit 4.8.23
    - Installation request for phpunit/phpunit (locked at 4.5.0, required as ~4.0) -> satisfiable by phpunit/phpunit[4.5.0].
    - Conclusion: don't install phpunit/phpunit 4.8.22
    - codeception/codeception 2.2.0 requires phpunit/phpunit >4.8.20 <6.0 -> satisfiable by phpunit/phpunit[4.8.21, 4.8.22, 4.8.23, 4.8.24, 4.8.25, 4.8.26].
    - codeception/codeception 2.2.1 requires phpunit/phpunit >4.8.20 <5.5 -> satisfiable by phpunit/phpunit[4.8.21, 4.8.22, 4.8.23, 4.8.24, 4.8.25, 4.8.26].
    - Conclusion: don't install phpunit/phpunit 4.8.21
    - Installation request for codeception/codeception 2.2.* -> satisfiable by codeception/codeception[2.2.0, 2.2.1].

So there also seems to be a problem with the PHPUnit requirements. Laravel 5.0 requires PHPUnit ~4.0 and Codeception 2.2 requires PHPUnit >4.8.20 <5.5, so there probably is a conflict with another dependency of Laravel 5.0.

So it doesn't look like we can simply fix Laravel 5.0 support by allowing Symfony components 2.6, if it even is possible to lower the Symfony components version for Codeception 2.2.

I also did a clean install of Laravel 5.1 and Codeception 2.2 and that ran without problems. Laravel also has very clear upgrade instructions to migrate from 5.0 to 5.1. So if you would like to use Codeception 2.2 with an old Laravel 5.0 application you should probably just upgrade to Laravel 5.1, which also is a LTS release.

I can mention this in the docs of the Laravel module and also add it to the Changelog for the 2.2 release if you guys agree with me. And what do you think @DavertMik?

As for the error about the database, Laravel 5.1 has a database directory in the root of the application which was located at app/database in 5.0. Did you follow the upgrade instructions at https://laravel.com/docs/master/upgrade?

@janhenkgerritsen

This comment has been minimized.

Show comment
Hide comment
@janhenkgerritsen

janhenkgerritsen Jul 1, 2016

Contributor

I added some information on the minimum supported version of Laravel 5 to the documentation of the Laravel 5 module in #3301.

I also added this as a breaking change to the CHANGELOG for the 2.2.0 release, as this could help users that have not upgraded yet.

Contributor

janhenkgerritsen commented Jul 1, 2016

I added some information on the minimum supported version of Laravel 5 to the documentation of the Laravel 5 module in #3301.

I also added this as a breaking change to the CHANGELOG for the 2.2.0 release, as this could help users that have not upgraded yet.

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