Needs review
Project:
Drupal core
Version:
main
Component:
extension system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2026 at 03:37 UTC
Updated:
24 Sep 2026 at 07:20 UTC
Jump to comment: Most recent
It's seems odd that hook_system_info_alter has the word "system" in it. It should really have the word "extension" instead. Furthermore, it makes it sound like the hook is provided by the system module, but it is not.
Introduce hook_extension_info_alter and deprecate hook_system_info_alter.
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 commentedMakes sense to me!
Comment #5
mstrelan commentedComment #7
daffie commentedJust a question: Should we create a BC layer instead of just removing the old
hook_system_info_alter? The current MR just removes the old hook.Comment #8
mstrelan commentedIt doesn't just remove the old hook, it invokes it with
$this->moduleHandler->alterDeprecated()Comment #9
daffie commentedAll code changes look good to me.
The new hook has replaced the old hook.
The old is still called as deprecated.
For me it is RTBC.
Comment #10
nicxvan commentedI tweaked the CR.
I always wonder in these cases, which do we call first? The new hook or the old one?
Is there a way to detect that something changed in the new hook and only call the legacy if nothing changes?
Comment #11
mstrelan commentedI can't imagine it matters too much here. If it does, implementors could always guard against it with a class property or even a conditional on the values in the info that has been altered.
Comment #12
nicxvan commentedFair enough, can we add a note to that effect to the CR?
Comment #13
catchOn the issue summary, this is because system module used to do all this, we only fully removed system_rebuild_module_data() in 2020.
Comment #14
mstrelan commented#12: added a couple sentences
#13: understood, I meant the current state seems odd, because of this.
Comment #15
catch@mstrelan yeah the original state was odd too IMO - the module system should never have lived in system module, installer used to have to call out to it etc. Only just got to the point where it doesn't in #3614153: Install system module alongside other modules in the installer.
Now that 12.0.x is open I think we should probably target this for 12.1.x for removal in 13.x - left suggestions on the MR.