magento2: Module uninstall does not work with composer

Preconditions

  1. Magento 2.2.5

Steps to reproduce

  1. Install Magento with composer (2.2.x)
  2. Install Sample Data with bin/magento sampledata:deploy
  3. Complete Sample Data installation: bin/magento setup:upgrade
  4. 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

  1. vendor/module folder should be removed
  2. composer.lock file should be updated, or, to have an update in the guide to fit the actual result.

Actual result

screen shot 2018-08-31 at 13 33 33

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)

Most upvoted comments

@hostep I can confirm that the option --no-update-with-dependencies works as desidered.