yiisoft/yii2-app-basic

Installation using PHP 5.6 fails, despite requirements

flaviovs opened this issue · 0 comments

What steps will reproduce the problem?

Follow installation instructions. I.e.:

php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic

What's expected?

Basic package installed.

What do you get instead?

Installing yiisoft/yii2-app-basic (dev-master 6dd4e00ce73d573481c1e0eed96afca7b6fb5834)
(...)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - yiisoft/yii2-swiftmailer 2.1.0 requires swiftmailer/swiftmailer ~6.0 -> satisfiable by swiftmailer/swiftmailer[6.2.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.1.0, v6.1.1, v6.1.2, v6.1.3, v6.2.0].
    - yiisoft/yii2-swiftmailer 2.1.1 requires swiftmailer/swiftmailer ~6.0 -> satisfiable by swiftmailer/swiftmailer[6.2.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.1.0, v6.1.1, v6.1.2, v6.1.3, v6.2.0].
    - yiisoft/yii2-swiftmailer 2.1.2 requires swiftmailer/swiftmailer ~6.0 -> satisfiable by swiftmailer/swiftmailer[6.2.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.1.0, v6.1.1, v6.1.2, v6.1.3, v6.2.0].
    - yiisoft/yii2-swiftmailer 2.1.x-dev requires swiftmailer/swiftmailer ~6.0 -> satisfiable by swiftmailer/swiftmailer[6.2.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.1.0, v6.1.1, v6.1.2, v6.1.3, v6.2.0].
    - swiftmailer/swiftmailer v6.2.0 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.1.3 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.1.2 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.1.1 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.1.0 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.0.2 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.0.1 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer v6.0.0 requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - swiftmailer/swiftmailer 6.2.x-dev requires php >=7.0.0 -> your PHP version (5.6.33) does not satisfy that requirement.
    - Installation request for yiisoft/yii2-swiftmailer ~2.1.0 -> satisfiable by yiisoft/yii2-swiftmailer[2.1.0, 2.1.1, 2.1.2, 2.1.x-dev].

Additional info

Q A
Yii vesion dev
PHP version 5.6.33 (stock from OS)
Operating system (Debian stretch)

From package homepage:

The minimum requirement by this project template that your Web server supports PHP 5.4.0.

Proposed solutions

  • Do not hard-require yii2-swiftmailer 2.1.* -- use ~2.0.0 and let composer decide for the right version
  • Add a note to the README for people using 5.6 with instructions about how to make the changes to composer.json and run composer install to proceed.

https://github.com/yiisoft/yii2-swiftmailer#installation details this PHP version issue.