-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 ignoring dependency versions #3669
Comments
I know we check requirements for updatedb. Its possible we don't for enable. Needs research. |
Do you want to point me at the relevant class? I'm happy to work on a |
See top of \Drush\Drupal\Commands\pm\PmCommands::enable. The code we need is similar to https://github.com/drush-ops/drush/blob/master/src/Commands/core/UpdateDBCommands.php#L43-L48 |
Just ran into this myself. V.happy to see this already here. |
Note the "magic" in core occurs in \Drupal\system\Form\ModulesListForm::buildModuleList(). What is super funky is that it invokes a module's hook_requirements() even though it is yet to be installed. See drupal_check_module() |
Just bumped to the same problem as well. |
I haven't checked nowadays how Drush works exactly, but thanks for this issue and @alexpott's last comment I took a quick look the code behind the pm:enable command. (Also related addInstallDependencies). |
Its quite possible that the code no longer needs to be as complex as it is. Feel free to write a new implementation. We are planning to release a new major version soonish anyway (drops PHP5, backend invoke, etc.). |
Closed in favor of #4337 |
Describe the bug
Drush 9 installs a module that Drupal blocks for installation on
admin/modules
.To Reproduce
Setup a Drupal 8.5.6 install
Create a bare bones module - just the
info.yml
file is needed.Specify a dependency with version:
Expected behavior
Drush should decline to install because the dependency is not satisfied.
Drupal displays:
Requires: System (>=8.6) (incompatible with version 8.5.6)
Actual behavior
Drush installed the module.
Workaround
None. I attempted to enforce with a redundant
hook_requirements
in a .install which also did not preventdrush en
from installing but did function properly for UI install. Are all requirements being skipped? Again, UI output wasThis module requires Drupal 8.6 or higher. Drupal 8.5.6 currently installed
and module did not install.System Configuration
The text was updated successfully, but these errors were encountered: