magento2: Module uninstall does not work with composer
Preconditions
- Magento 2.2.5
Steps to reproduce
- Install Magento with composer (2.2.x)
- Install Sample Data with bin/magento sampledata:deploy
- Complete Sample Data installation: bin/magento setup:upgrade
- Remove one package: bin/magento module:uninstall Magento_CmsSampleData
Expected result
The expecteded result is that the result matches the guide and its sample: https://devdocs.magento.com/guides/v2.2/install-gde/install/cli/install-cli-uninstall-mods.html
- vendor/module folder should be removed
- composer.lock file should be updated, or, to have an update in the guide to fit the actual result.
Actual result
Missing expected result (matching the guide):
Removing code from Magento codebase: Loading composer repositories with package information Updating dependencies (including require-dev) Removing magento/module-cms-sample-data (100.2.0) Removing Magento/CmsSampleData Writing lock file Generating autoload files
That means that with the next magento setup:upgrade
the module will be reinstalled.
In Framework\Composer\Remove.php, function remove, line 49, the option --no-update
is set, that does not match with what the guide says.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (14 by maintainers)
@hostep I can confirm that the option
--no-update-with-dependencies
works as desidered.