magento2
magento2 copied to clipboard
Upgrade to version 2.4.7 gives symfony/process errors
Preconditions and environment
I had successfully upgraded my Magento installation in the past, and now I have 2.4.6-p7. I tried to upgrade it to version 2.4.7-p2, and I got an error associated with symfony/process module.
Steps to reproduce
When I executed the command composer update --no-dev --dry-run, I got the below error associated with symfony/process module:
Loading composer repositories with package information
Updating dependencies
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.22) 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.3].
- magento/product-community-edition 2.4.7-p2 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.22) does not satisfy that requirement.
- Root composer.json requires magento/product-community-edition 2.4.7-p2 -> satisfiable by magento/product-community-edition[2.4.7-p2].
- 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.
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
I also tried the command composer update --no-dev --with-all-dependencies --dry-run, but the result was the same. I used the command composer show and found the following modules and versions of my Magento 2.4.6-p7:
symfony/process: v5.4.40 magento/magento2-functional-testing-framework: v3.12.0
Expected result
The upgrade is successful.
Actual result
The upgrade failed. It seems that Magento 2.4.7 requires the version 6.4 of the module symfony/process. However, the upgrade of the module symfony/process to version 6.4 cannot be done as the current version 5.4.40 requires PHP 7.2.5 while, according to the documentation, Magento 2.4.7 requires at least PHP 8.1 and this for the upgrade process only.
Additional information
No response
Release note
No response
Triage and priority
- [x] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [ ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @dandrikop. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance- upcoming 2.4.x release- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this - To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Make sure to take over the changes done to the composer.json file from core magento, the diff between 2.4.6-p7 and 2.4.7-p2 is this:
--- magento246-p7-test/composer.json 2024-08-06 05:26:14
+++ magento247-p2-test/composer.json 2024-08-06 06:25:30
@@ -16,11 +16,11 @@
"preferred-install": "dist",
"sort-packages": true
},
- "version": "2.4.6-p7",
+ "version": "2.4.7-p2",
"require": {
- "magento/product-community-edition": "2.4.6-p7",
- "magento/composer-root-update-plugin": "~2.0",
- "magento/composer-dependency-version-audit-plugin": "~0.1"
+ "magento/product-community-edition": "2.4.7-p2",
+ "magento/composer-dependency-version-audit-plugin": "~0.1",
+ "magento/composer-root-update-plugin": "^2.0.4"
},
"autoload": {
"exclude-from-classmap": [
@@ -38,27 +38,23 @@
]
},
"psr-4": {
- "Magento\\": "app/code/Magento/",
- "Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/"
}
},
"require-dev": {
"allure-framework/allure-phpunit": "^2",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
"dg/bypass-finals": "^1.4",
- "friendsofphp/php-cs-fixer": "^3.8",
+ "friendsofphp/php-cs-fixer": "^3.22",
"lusitanian/oauth": "^0.8",
"magento/magento-coding-standard": "*",
- "magento/magento2-functional-testing-framework": "^4.3.1",
+ "magento/magento2-functional-testing-framework": "^4.7",
"pdepend/pdepend": "^2.10",
"phpmd/phpmd": "^2.12",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
- "sebastian/comparator": "<=4.0.6",
"sebastian/phpcpd": "^6.0",
- "symfony/finder": "^5.4",
- "symfony/process": "<=v5.4.23"
+ "symfony/finder": "^6.4"
},
"conflict": {
"gene/bluefoot": "*"
In your case, the problem is likely that requirement on symfony/finder that needs to be updated or symfony/process requirement that should be removed. And the fact that the version of magento/magento2-functional-testing-framework is really old. But I would highly recommend to take over all the changes.
Each time you update Magento, I would suggest executing these steps in an empty directory to double check the changes in composer.json file:
# replace the exact versions in the commands below, and make sure you have your authentication keys at hand
$ composer create-project --no-install --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.6-p7 ./old-version
$ composer create-project --no-install --repository-url=https://repo.magento.com/ magento/project-community-edition:2.4.7-p2 ./new-version
$ diff -u old-version/composer.json new-version/composer.json
@hostep
Thanks for your feedback. I followed your advice, and I worked only with the section "require-dev" of my composer.json file; i.e. I didn't touch any other section of the file. Specifically, at the section "require-dev" I made one-by-one the changes below till the command composer update --no-dev --dry-run was finally successful:
"symfony/finder": "^5.2"changed to"symfony/finder": "^6.4""friendsofphp/php-cs-fixer": "~2.18.1"changed to"friendsofphp/php-cs-fixer": "^3.22""magento/magento2-functional-testing-framework": "^3.0"changed to"magento/magento2-functional-testing-framework": "^4.7""allure-framework/allure-phpunit": "~1.4"changed to"allure-framework/allure-phpunit": "^2""phpmd/phpmd": "^2.8.0"changed to"phpmd/phpmd": "^2.12""pdepend/pdepend": "~2.7.1"changed to"pdepend/pdepend": "^2.10"
However, comparing the section "require-dev" of my composer.json file with the one of Magento 2.4.7-p2, I still find differences like the following:
"dg/bypass-finals": "^1.4", but in mine it does not exist, at all."phpunit/phpunit": "^9.5", but mine is"^9""phpstan/phpstan": "^1.9", but mine is"^0.12.77"
Should I also include those changes at the section "require-dev" of my composer.json file, no matter that the command composer update --no-dev --dry-run was successful?
You are free to do with the composer.json like you want, you are the owner of that file. See the default one Magento creates as a base and as something you can build further upon.
But my advise would be to stay as close as possible to the default version, because the list of those packages is how Magento has been tested.
@hostep Thanks for your Contribution!!.
Hi @dandrikop,
Thanks for your reporting and collaboration.
As per this comment https://github.com/magento/magento2/issues/39113#issuecomment-2312648163 the issue has been resolved we are closing this issue.
Thanks.