Skip to content
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

pm:enable should be pm:install #4588

Closed
jhodgdon-drp opened this issue Nov 13, 2020 · 5 comments
Closed

pm:enable should be pm:install #4588

jhodgdon-drp opened this issue Nov 13, 2020 · 5 comments

Comments

@jhodgdon-drp
Copy link

Describe the bug
In Drupal 8.x and above, there is no longer a way to "enable/disable" modules. Instead we "install/uninstall" them.

However, Drush still has a pm:enable command along with pm:uninstall.

This is confusing (enable is the opposite of uninstall?) and inconsistent with the Drupal UI.

To Reproduce
List commands in Drush and you'll see that pm:enable turns a module on, and pm:uninstall turns it off (which also involves adding/removing configuration, database tables, and/or content).

Expected behavior
The pm:enable command should be named pm:install for consistency with the Drupal UI and with the pm:uninstall command.

System Configuration

Q A
Drush version? 10.x
Drupal version? 9.x/8.x
PHP version any
OS? any

Additional information
Drupal core issue about making the Drupal UI more consistent in this area:
https://www.drupal.org/project/drupal/issues/2891294
which is part of a meta issue:
https://www.drupal.org/project/drupal/issues/2888657

@greg-1-anderson
Copy link
Member

+1 we can keep pm:enable as an alias, so there is little cost to doing this.

@weitzman
Copy link
Member

weitzman commented Dec 5, 2020

Yeah, this is a good proposal ... The docs web page will change url. We could add a redirect plugin for mkdocs if we want to avoid a few 404s.

@rajeshreeputra
Copy link
Contributor

rajeshreeputra commented Feb 2, 2022

I have create PR #5061
Also kept alias "install, pm-install, en, pm-enable, pm:enable" for pm:install
@weitzman could you please review changes in PR.

I have tested this on local and confirming that below all commands are working fine, as expected.

drush en
drush pm-enable
drush pm:enable
drush install
drush pm-install
drush pm:install

@gitressa
Copy link
Contributor

This is an improvement, but for consistency, shouldn't we also add an un alias for pm:uninstall, just as pm:install has in?

pm:install

Aliases: in, install, pm-install, en, pm-enable, pm:enable

pm:uninstall

Aliases: pmu, pm-uninstall

@gitressa
Copy link
Contributor

I created a PR which adds a un alias, #5131.

$ drush | grep pm:uninstall
  pm:uninstall (un, pmu)      Uninstall one or more modules and their dependent modules.

$ drush un diff
 [success] Successfully uninstalled: diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants