Closed (fixed)
Project:
Drupal core
Version:
11.1.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2024 at 02:47 UTC
Updated:
26 Nov 2024 at 00:19 UTC
Jump to comment: Most recent
The following hooks can be OOP if we change how they are invoked
Are all invoked using invokeAll during module install.
Since these are all acting on already installed modules we can replace the moduleInstaller invoke with moduleHandler invoke
Convert a hook
Install a module
Uninstall a module
See hooks did not run
Update the original OOP hook CR to remove it from the list of unsupported hooks.
https://www.drupal.org/node/3442349
Publish CR with this too
N/A
N/A
N/A
N/A
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
nicxvan commentedComment #3
nicxvan commentedComment #4
nicxvan commentedComment #6
nicxvan commentedPreinstall Triggers this:
In themeManager
Comment #7
nicxvan commentedComment #8
nicxvan commentedComment #9
nicxvan commentedComment #10
nicxvan commentedComment #11
nicxvan commentedComment #12
nicxvan commentedComment #13
nicxvan commentedComment #14
catchThis looks really tidy and well scoped. The genuinely weird install hooks are left as is, just the 'normal' hooks that happens to be about installing modules converted, actual code change is a few characters. RTBC for me.
Comment #18
larowlanCommitted to 11.x and backported to 11.1.x
Published change notice
Comment #19
nicxvan commentedThank you so much! I'll update the CR for #3442009: OOP hooks using attributes and event dispatcher to reflect the hooks that are now available since that issue has more visibility.