Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The documentation for hook_modules_installed() still refers twice to \Drupal\Core\Extension\ModuleHandler::install() although this has been replaced by \Drupal\Core\Extension\ModuleInstaller::install() in https://www.drupal.org/node/1894902.
Some (all ?) locations where this still exists are:
- hook_modules_installed($modules) (2)
- module_set_weight()
- InstallerServiceProvider::alter()
- LanguageNegotiator::purgeConfiguration() and ::updateConfiguration() (4 in all: install and uninstall)
- ModuleHandlerTest::testDependencyResolution() and ::testDependencyResolution() (3 install and 1 uninstall, although the logic is correct, this is just in the error messages), and 5 uninstall in testUninstallContentDependency()
Comment | File | Size | Author |
---|---|---|---|
#3 | 0001-Issue-2760883-replace-ModuleHandler-by-ModuleInstall.patch | 10.42 KB | fgm |
Comments
Comment #2
cilefen CreditAttribution: cilefen commentedComment #3
fgmComment #4
dawehnerLovely! I like how this issue was really easy to review :)
Comment #7
xjmI confirmed this covers all the instances that might be formatted differently as well, with:
grep -rh "install(" * | grep -i "handler"
The remaining references are all related to themes instead. Can we have a followup issue to fix the references to the deprecated theme handler as well?
Committed and pushed to 8.2.x and 8.1.x. Thanks!
Comment #8
fgmFollowup created #2776031: Properly deprecate ThemeHandlerInterface install() and uninstall() also replace usage
Comment #9
fgmAnd follow tests come back green : anyone to review ?