-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
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
[2.1.0] module:uninstall can remove code it uses itself #5797
Comments
Possible related issue: #3544 |
Hi @hostep Thank you for deep investigation and reporting. |
Fixed issues: * MAGETWO-57820: [GITHUB] php bin/magento i18n:pack creates unwanted dir #6260 Bug - P1 * MAGETWO-58337: [Github] Duplicated & missing product rows in system product export #4531 * MAGETWO-58289: [Github] Product URL Key not automatically generating during import #5128 * MAGETWO-58134: [GitHub] Products became “out of stock” after update from 2.0.7 to 2.1.0 #5222 * MAGETWO-58132: [GitHub] module:uninstall can remove code it uses itself #5797 * MAGETWO-58236: Sync requirements of composer.json of Sample-data with mainline
I'm unable to upgrade from 2.1.3 to 2.1.6 because of this error. It removes symfony/process and then immediately throws the error. It happens during the "composer update" command, so that doesn't help me. |
@hostep, thank you for your report. |
Hi @hostep. Thank you for your report. The fix will be available with the upcoming 2.3.1 release. |
I have a similar issue in Magento 2.4.2 |
@Eddcapone: please open a new issue, the fix mentioned above is still in Magento 2.4.2 so you are probably running against a new bug. |
apparently I ran |
Preconditions
composer
version 1.1.3 by adding this to our composer.json file:"composer/composer": "1.1.3 as 1.0.0-beta1",
, due to another bug, but I think it won't really matter which version is being usedSteps to reproduce
symfony/process
version 2.8.8 wasn't released yet (hint: try to downgrade to version 2.8.7 of the module after step 2)composer require
,bin/magento setup:upgrade
, ...)symfony/process
version 2.8.8 was released (hint: don't do anything in this step)bin/magento module:uninstall
Expected result
Actual result
composer
, it also at the same time tries to updatesymfony/process
from version 2.8.7 to 2.8.8 for some strange reason. And sincesymfony/process
is being used by themodule:uninstall
command, the command stops running.Bit of debugging
It turns out at the step when the
composer remove
step is executed, this happens:So for some reason
symfony/process
gets updated to the latest version while removing another module which has no direct dependencies onsymfony/process
. But this particular module has some dependencies on some magento modules which in itself will probably have dependencies onsymfony/process
module.I think you can work around this if you add the
--no-update-with-dependencies
switch, since that won't updatesymfony/process
:Please review thoroughly, because this seems to be something which can turn out to be quite complicated!
Also: I haven't tested my solution with that
--no-update-with-dependencies
flag yet.For other people running into this problem: first update all your dependencies to the latest version by just running
composer update
(hint you can runcomposer update --dry-run
to preview what it will do first) and only after your dependencies are updated, run themodule:uninstall
command.The text was updated successfully, but these errors were encountered: