Tried to update magento to 2.4.7 but got this php version problem. SO:
cp composer.json composer.json.bak
composer require magento/composer-root-update-plugin ~2.0 –no-update
composer update
composer require-commerce magento/product-community-edition 2.4.7 –no-update
composer update
gives:
Problem 1
– symfony/process[v4.4.0, …, v4.4.10] require php ^7.1.3 -> your php version (8.1.27) does not satisfy that requirement.
– magento/magento2-functional-testing-framework[3.10.0, …, 3.12.0] require symfony/process ^4.4||^5.4 -> satisfiable by symfony/process[v4.4.0, …, v4.4.44, v5.4.0, …, v5.4.39].
– magento/magento2-functional-testing-framework[3.7.0, …, 3.9.0] require symfony/process ^4.4 -> satisfiable by symfony/process[v4.4.0, …, v4.4.44].
– You can only install one version of a package, so only one of these can be installed: symfony/process[2.0.4, …, v2.8.52, v3.0.0, …, v3.4.47, v4.0.0, …, v4.4.44, v5.0.0, …, v5.4.39, v6.0.0, …, v6.4.7, v7.0.0, …, v7.0.7].
– magento/product-community-edition 2.4.7 requires symfony/process ^6.4 -> satisfiable by symfony/process[v6.4.0, …, v6.4.7].
– Root composer.json requires magento/product-community-edition 2.4.7 -> satisfiable by magento/product-community-edition[2.4.7].
– Root composer.json requires magento/magento2-functional-testing-framework ^3.7 -> satisfiable by magento/magento2-functional-testing-framework[3.7.0, …, 3.12.0].
So how to proceed with the update?
2
Answers
You need to add below extensions in your composer.json
"require": {
"symfony/console": "^6.4",
"symfony/intl": "^6.4",
"symfony/process": "^6.4",
"symfony/string": "^6.4"
},
"require-dev": {
"allure-framework/allure-phpunit": "^2",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
"dg/bypass-finals": "^1.4",
"friendsofphp/php-cs-fixer": "^3.22",
"lusitanian/oauth": "^0.8",
"magento/magento-coding-standard": "*",
"magento/magento2-functional-testing-framework": "^4.7",
"pdepend/pdepend": "^2.10",
"phpmd/phpmd": "^2.12",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"sebastian/phpcpd": "^6.0",
"symfony/finder": "^6.4"
}
Run composer update
Go to the Magento 2 GitHub repository for version 2.4.7
For example, check if "symfony/process": "^6.4" is listed.
version.
This process should help resolve the issue.
EDITED…
1st => To solve issue please modify in composer.json to
"symfony/process": "6.4.0",
Adding version "magento/magento2-functional-testing-framework": "^4.4.2" or "^4.7" in
"require-dev": {
"magento/magento2-functional-testing-framework": "^4.7"
}
will work fine for me as i recently updated magento version to 2.4.7