Trying to update site from 2.4.6-p6 to 2.4.7 or 2.4.7-p1
composer.phar require magento/product-community-edition=2.4.7 --no-update
composer.phar update
Your requirements could not be resolved to an installable set of packages. Problem 1 - symfony/process[v4.4.0, ..., v4.4.10] require php ^7.1.3 -> your php version (8.2.21) 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.40]. - 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.40, v6.0.0, ..., v6.4.8, v7.0.0, ..., v7.1.1]. - magento/product-community-edition 2.4.7 requires symfony/process ^6.4 -> satisfiable by symfony/process[v6.4.0, ..., v6.4.8]. - magento/magento2-functional-testing-framework[3.0.0, ..., 3.6.1] require php ^7.3 -> your php version (8.2.21) does not satisfy that requirement. - 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.0 -> satisfiable by magento/magento2-functional-testing-framework[3.0.0, ..., 3.12.0]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
It seems that Symfony has v4.4 loaded & I can't seem to persuade it to load v6.4.
I have tried using the option -W but still the same error.
If I run the newer version of the command
composer.phar require-commerce magento/product-community-edition=2.4.7-p1 --no-update
composer.phar update
I get a different error
PHP Fatal error: Declaration of Magento\ComposerRootUpdatePlugin\Plugin\Commands\MageRootRequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Composer\Command\RequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /var/www/vhosts/**************/vendor/magento/composer-root-update-plugin/Plugin/Commands/MageRootRequireCommand.php on line 151 Fatal error: Declaration of Magento\ComposerRootUpdatePlugin\Plugin\Commands\MageRootRequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Composer\Command\RequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /var/www/vhosts/****************/vendor/magento/composer-root-update-plugin/Plugin/Commands/MageRootRequireCommand.php on line 151
I have tried running it with PHP 8, 8.1 & 8.2
composer.json file
{ "name": "magento/project-community-edition", "description": "eCommerce Platform for Growth (Community Edition)", "type": "project", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "magento/magento-composer-installer": true, "magento/inventory-composer-installer": true, "laminas/laminas-dependency-plugin": false, "magento/composer-dependency-version-audit-plugin": true, "magento/composer-root-update-plugin": true, "dealerdirect/phpcodesniffer-composer-installer": false } }, "version": "2.4.1", "require": { "enlightn/security-checker": "^1.10.0 || ^2", "magento/composer-dependency-version-audit-plugin": "~0.1", "magento/composer-root-update-plugin": "~1.0", "magento/product-community-edition": "2.4.6-p6" }, "autoload": { "exclude-from-classmap": [ "**/dev/**", "**/update/**", "**/Test/**" ], "files": [ "app/etc/NonComposerComponentRegistration.php" ], "psr-0": { "": [ "app/code/", "generated/code/" ] }, "psr-4": { "Magento\\": "app/code/Magento/", "Magento\\Framework\\": "lib/internal/Magento/Framework/", "Magento\\Setup\\": "setup/src/Magento/Setup/" } }, "require-dev": { "allure-framework/allure-phpunit": "~1.4", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "friendsofphp/php-cs-fixer": "~2.18.1", "lusitanian/oauth": "~0.8.10", "magento/magento-coding-standard": "*", "magento/magento2-functional-testing-framework": "^3.0", "pdepend/pdepend": "~2.7.1", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.8.0", "phpstan/phpstan": "^0.12.77", "phpunit/phpunit": "^9", "sebastian/phpcpd": "^6.0.3", "squizlabs/php_codesniffer": "~3.5.4", "symfony/finder": "^5.2" }, "conflict": { "gene/bluefoot": "*" }, "autoload-dev": { "psr-4": { "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/", "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", "Magento\\Tools\\": "dev/tools/Magento/Tools/", "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/" } }, "minimum-stability": "stable", "prefer-stable": true, "repositories": [ { "type": "composer", "url": "https://repo.magento.com/" } ], "extra": { "magento-force": "override" } }
Thanks for looking.
Hello @infoposter8bf1,
The issue you're encountering stems from compatibility conflicts between different versions of dependencies, specifically with the symfony/process package and Magento's functional testing framework (MFTF). Here’s how you can attempt to resolve the issue:
Update symfony/process in composer.json:
"require": { "symfony/process": "^6.4", "magento/product-community-edition": "2.4.7" }
Adjust MFTF Requirements:
"require-dev": { // other dev dependencies... //"magento/magento2-functional-testing-framework": "^3.0" }
Run Composer Update with Dependency Resolution:
composer.phar require magento/product-community-edition=2.4.7-p1 --with-all-dependencies
composer.phar update
Install Missing Dependencies:
composer.phar require magento/magento2-functional-testing-framework –dev
Revert if Necessary:
If the upgrade fails, ensure you have a backup of your composer.json, composer.lock, and other critical files to revert if needed.
This process should help resolve the dependency conflicts and allow you to upgrade to Magento 2.4.7 or 2.4.7-p1.
If the issue will be resolved, Click Kudos & Accept as a Solution.
I encounter a different error:
PHP Fatal error: Declaration of Magento\ComposerRootUpdatePlugin\Plugin\Commands\MageRootRequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Composer\Command\RequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /var/www/vhosts/**************/vendor/magento/composer-root-update-plugin/Plugin/Commands/MageRootRequireCommand.php on line 151 Fatal error: Declaration of Magento\ComposerRootUpdatePlugin\Plugin\Commands\MageRootRequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Composer\Command\RequireCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /var/www/vhosts/****************/vendor/magento/composer-root-update-plugin/Plugin/Commands/MageRootRequireCommand.php on line 151
I've tried running it with PHP 8.0, 8.1, and 8.2, but the error remains.
Here’s the composer.json file:
{ "name": "magento/project-community-edition", "description": "eCommerce Platform for Growth (Community Edition)", "type": "project", "license": [ "OSL-3.0", "AFL-3.0" ], "config": { "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "magento/magento-composer-installer": true, "magento/inventory-composer-installer": true, "laminas/laminas-dependency-plugin": false, "magento/composer-dependency-version-audit-plugin": true, "magento/composer-root-update-plugin": true, "dealerdirect/phpcodesniffer-composer-installer": false } }, "version": "2.4.1", "require": { "enlightn/security-checker": "^1.10.0 || ^2", "magento/composer-dependency-version-audit-plugin": "~0.1", "magento/composer-root-update-plugin": "~1.0", "magento/product-community-edition": "2.4.6-p6" }, "autoload": { "exclude-from-classmap": [ "**/dev/**", "**/update/**", "**/Test/**" ], "files": [ "app/etc/NonComposerComponentRegistration.php" ], "psr-0": { "": [ "app/code/", "generated/code/" ] }, "psr-4": { "Magento\\": "app/code/Magento/", "Magento\\Framework\\": "lib/internal/Magento/Framework/", "Magento\\Setup\\": "setup/src/Magento/Setup/" } }, "require-dev": { "allure-framework/allure-phpunit": "~1.4", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "friendsofphp/php-cs-fixer": "~2.18.1", "lusitanian/oauth": "~0.8.10", "magento/magento-coding-standard": "*", "magento/magento2-functional-testing-framework": "^3.0", "pdepend/pdepend": "~2.7.1", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.8.0", "phpstan/phpstan": "^0.12.77", "phpunit/phpunit": "^9", "sebastian/phpcpd": "^6.0.3", "squizlabs/php_codesniffer": "~3.5.4", "symfony/finder": "^5.2" }, "conflict": { "gene/bluefoot": "*" }, "autoload-dev": { "psr-4": { "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/", "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/", "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/", "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/", "Magento\\Tools\\": "dev/tools/Magento/Tools/", "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/" } }, "minimum-stability": "stable", "prefer-stable": true, "repositories": [ { "type": "composer", "url": "https://repo.magento.com/" } ], "extra": { "magento-force": "override" } }
You might get some info there :https://magento.stackexchange.com/questions/374316/update-to-2-4-7-give-symfony-error
It looks like you’re running into conflicts between the Magento composer plugins and the required Symfony version for Magento 2.4.7. A couple of things you can try:
Update the composer plugins first
Run:
Version 1.x of the composer-root-update-plugin isn’t fully compatible with PHP 8.x, which causes that execute() declaration error.
Allow dependencies to adjust
When upgrading Magento core, use:
This forces Composer to align Symfony with the right 6.4 version.
Check your PHP CLI version
Make sure the CLI version running Composer matches what Magento 2.4.7 supports (PHP 8.1 or 8.2). Sometimes hosting environments default to PHP 7.x for CLI, which triggers the mismatch.
If all else fails
Try removing the lock file and vendor/ folder, then re-run the composer install with the updated requirements.
I faced a similar headache when upgrading dependencies for my own project https://nolcardbalancecheckk.com/ and cleaning up old plugin versions before running the update solved it.
I ran into the same problem while moving a store to 2.4.7, and it really came down to outdated composer plugins clashing with the newer Symfony requirement. What finally worked was upgrading the composer-root-update-plugin to the latest 2.x release, then running the Magento update with with-all-dependencies so Composer could sort out Symfony 6.4 properly.
It’s also worth checking that your PHP CLI matches the supported version (8.1 or 8.2), since mismatches there can cause hidden conflicts. In one case, I had to clear out the composer.lock and vendor folder before a clean install, which saved me hours of debugging.
I’ve been keeping track of these upgrade hiccups on my own site (https://nolcardbalanceae.com) in case others run into the same headache.
Thanks for sharing your solution! Upgrading the `magento/composer-root-update-plugin` to the latest 2.x release and using the `--with-all-dependencies` flag did the trick. Clearing the `composer.lock` and `vendor` folder also helped avoid any conflicts. For others facing this, make sure your PHP CLI version (I used 8.1) matches Magento 2.4.7's requirements. Really appreciate the advice!
I also encountered this problem https://pipsnyt.info/ when running my project, and upgrading can indeed solve this problem