- Errors Installing Data Migration 2.2.0 Tool with Composer
- Saved searches
- Use saved searches to filter your results more quickly
- Incorrect PHP version requirement #440
- Incorrect PHP version requirement #440
- Comments
- What steps will reproduce the problem?
- What’s expected?
- What do you get instead?
- Additional info
- Overridden by config platform php version
- Using PHP composer with multiple versions of PHP
Errors Installing Data Migration 2.2.0 Tool with Composer
Running the different commands below and getting errors with each of them. How do I get the data migration tool to install? I also pasted in our composer.json file below. First Attempt This one says data-migration-tool 2.2.0 requires magento/framework ~101.0.0. But It doesn’t want to install with my version of php.
composer require magento/data-migration-tool:2.2.0 ---- ./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 - magento/framework 101.0.9 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.8 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.7 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.6 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.5 requires php ~7.0.13|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.4 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.3 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.2 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.1 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/framework 101.0.0 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.2.18) overridden by "config.platform.php" version (7.2.18) does not satisfy that requirement. - magento/data-migration-tool 2.2.0 requires magento/framework ~101.0.0 -> satisfiable by magento/framework[101.0.0, 101.0.1, 101.0.2, 101.0.3, 101.0.4, 101.0.5, 101.0.6, 101.0.7, 101.0.8, 101.0.9]. - Installation request for magento/data-migration-tool 2.2.0 -> satisfiable by magento/data-migration-tool[2.2.0]. Installation failed, reverting ./composer.json to its original content.
Second Attempt This one says don’t install magento/framework ~101.0.0 but then to install it?
composer require magento/data-migration-tool:2.2.0 --ignore-platform-reqs ---- ./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 - Installation request for magento/framework (locked at 102.0.1) -> satisfiable by magento/framework[102.0.1]. - Installation request for magento/data-migration-tool 2.2.0 -> satisfiable by magento/data-migration-tool[2.2.0]. - Conclusion: don't install magento/framework 101.0.0 - Can only install one of: colinmollenhour/php-redis-session-abstract[v1.4.1, v1.3.4]. - Can only install one of: colinmollenhour/php-redis-session-abstract[v1.3.4, v1.4.1]. - Can only install one of: colinmollenhour/php-redis-session-abstract[v1.3.4, v1.4.1]. - Conclusion: install magento/framework 101.0.0|install colinmollenhour/php-redis-session-abstract v1.3.4 - Installation request for colinmollenhour/php-redis-session-abstract (locked at v1.4.1) -> satisfiable by colinmollenhour/php-redis-session-abstract[v1.4.1]. Installation failed, reverting ./composer.json to its original content.
More Info The composer update command seems to work fine and it updates everything. Only issues with that is that it tells me phpunit/phpunit-mock-objects is abandoned.
composer update ---- Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested. Generating autoload files
< "name": "magento/project-enterprise-edition", "description": "eCommerce Platform for Growth (Enterprise Edition)", "type": "project", "license": [ "proprietary" ], "config": < "preferred-install": "dist", "platform": < "php": "7.2.18" >>, "require": < "algolia/algoliasearch-magento-2": "^1.11", "ethanyehuda/magento2-cronjobmanager": "^1.8", "magento/product-enterprise-edition": "2.3.1" >, "require-dev": < "friendsofphp/php-cs-fixer": "~2.13.0", "lusitanian/oauth": "~0.8.10", "magento/magento2-functional-testing-framework": "~2.3.13", "pdepend/pdepend": "2.5.2", "phpmd/phpmd": "@stable", "phpunit/phpunit": "~6.5.0", "sebastian/phpcpd": "~3.0.0", "squizlabs/php_codesniffer": "3.3.1", "allure-framework/allure-phpunit": "~1.2.0" >, "conflict": < "gene/bluefoot": "*" >, "autoload": < "psr-4": < "Magento\\Framework\\": "lib/internal/Magento/Framework/", "Magento\\Setup\\": "setup/src/Magento/Setup/", "Magento\\": "app/code/Magento/", "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/" >, "psr-0": < "": [ "app/code/", "generated/code/" ] >, "files": [ "app/etc/NonComposerComponentRegistration.php" ], "exclude-from-classmap": [ "**/dev/**", "**/update/**", "**/Test/**" ] >, "autoload-dev": < "psr-4": < "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", "Magento\\Tools\\": "dev/tools/Magento/Tools/", "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/", "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/" >>, "version": "2.3.1", "minimum-stability": "stable", "repositories": [ < "type": "composer", "url": "https://repo.magento.com/" >], "extra": < "magento-force": "override" >>
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
yiisoft / yii2-app-advanced Public template
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect PHP version requirement #440
Incorrect PHP version requirement #440
Comments
What steps will reproduce the problem?
Attempt to develop an application using this template on PHP 5.6:
What’s expected?
What do you get instead?
Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for codeception/verify ~1.1.0 -> satisfiable by codeception/verify[1.1.0]. - codeception/verify 1.1.0 requires php >= 7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. Problem 2 - phpunit/phpunit 6.5.9 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.8 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.7 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.6 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.5 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.14 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.13 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.12 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.11 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - phpunit/phpunit 6.5.10 requires php ^7.0 -> your PHP version (7.3.4-1+ubuntu18.04.1+deb.sury.org+3) overridden by "config.platform.php" version (5.6.0) does not satisfy that requirement. - Installation request for phpunit/phpunit ~6.5.5 -> satisfiable by phpunit/phpunit[6.5.10, 6.5.11, 6.5.12, 6.5.13, 6.5.14, 6.5.5, 6.5.6, 6.5.7, 6.5.8, 6.5.9].
Additional info
The text was updated successfully, but these errors were encountered:
Overridden by config platform php version
Software QA. I also develop things at the weekend.
Using PHP composer with multiple versions of PHP
This problem has hurt me a few times while updating a Drupal website, so I’m mostly posting this braindump for myself. But, it might help somebody else.
The main cause of my problem is I commit composer’s /vendor directory into git. (Why do I do this? Here’s an article which explains better than I could on why you may want to commit the vendor directory. In short, I find it more helpful to have all the code in git, for easier deployment. But, I may change my mind in the future, given these recent problems I’ve been having).
Anyway. My computer (which I use to update Drupal for my site) runs php 7.1, and my server is still running php 7.0. This causes problems in terms of dependencies, when composer assumes I’ll be using php 7.1, so I inevitably get code errors.
I solved this problem by adding a few lines to my composer.json:
Which worked fine, until a dependency update meant I didn’t have the correct php version. This caused composer to update to an older version of Drupal (Drupal 8.4.8 rather than Drupal 8.5.3), and this output when I forced composer to update to Drupal 8.5.x:
Problem 1 - drupal/core 8.6.x-dev requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.x-dev requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.3 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.2 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.1 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.0-rc1 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.0-beta1 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.0-alpha1 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - drupal/core 8.5.0 requires php ^5.5.9|>=7.0.8 -> your PHP version (7.1.7) overridden by "config.platform.php" version (7.0) does not satisfy that requirement. - Installation request for drupal/core ~8.5 -> satisfiable by drupal/core[8.5.0, 8.5.0-alpha1, 8.5.0-beta1, 8.5.0-rc1, 8.5.1, 8.5.2, 8.5.3, 8.5.x-dev, 8.6.x-dev]. (As a side-note, my initial reaction was to try `composer update --with-dependencies --ignore-platform-reqs`, which worked, but of course meant that composer wasn't downloading dependencies for php 7.0, which is what I wanted).
Turns out, as I had php 7.0.30 installed on my server, I could just update my composer.json to update the platform tag, and do a regular composer update . Which did the job, for now. I’ll inevitably need to update my server to php 7.2, eventually.
So, tl;dr, there’s two things I need to remember:
- If I commit my composer vendor folder, I need to ensure that both my work computer and my server have exactly the same version of php on both machines
- If not, then to ensure code works properly, I need to add a platform tag into my composer.json file, ensuring it is accurate, including fix bug versions. And remember never to use —ignore-platform-reqs . It will mean that composer will update, but to the wrong version.