Closed (fixed)
Project:
Drupal core
Version:
main
Component:
extension system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2026 at 15:40 UTC
Updated:
7 Mar 2026 at 04:25 UTC
Jump to comment: Most recent
Let's remove hook_hook_info and support for it in 12 sinc.e it was deprecated for removal
N/A
Remove the autoloading of .inc and persistent groupIncludes .inc for hook_hook_info resolution.
Remove tests related to it
Remove remaining hook_hook_info implementations
See https://www.drupal.org/node/3489765 for more information, this is not a normal deprecation removal
Review
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 #4
nicxvan commentedComment #5
nicxvan commentedComment #6
nicxvan commentedComment #7
nicxvan commentedLet's postpone the other one instead since this is closer.
Comment #8
nicxvan commentedComment #9
smustgrave commentedShould hook_hook_info() be removed from Hook.php ?
Comment #10
nicxvan commentedGood catch, updated!
I searched again, I think that was the only remaining reference.
Comment #11
smustgrave commentedThat's also all I found too. LGTM!
Comment #12
nicxvan commentedComment #13
berdirWe can do a little bit more cleanup I think.
Comment #14
nicxvan commentedYou're right, I must have been thinking of something else, I removed it.
Comment #15
berdirThanks, even more code removed now, yay.
Comment #17
catchCommitted/pushed to main, thanks!
Comment #20
berdirI think this broke old requirements hooks in .install.
I was trying to enable a module with drush and had search_api enabled.
Drush doesn't yet support the new requirements hook but that doesn't really matter, core still would call the old one too. In \Drush\Commands\pm\PmCommands::validateEnableModules(), it calls invoke on that for the new module that I'm trying to install. it also loads the .install file, but only for that module obviously.
However, that also initializes the hook list, and while it still scans .install files, it no longer loads them automatically. Which is kind of fine but at the same time, it expects them to be loaded as it unconditionally resolves that callback, resulting in "Class "search_api_requirements" does not exist."
I think #3549397: [regression] Uninstalling and installing modules during config:import can lead to fatal errors might address that in a way, but relying on catching exception for this case doesn't seem so great. I wonder if we could get away with skipping requirements hooks from hook discovery completely and force a fallback to legacy invoke?
Comment #21
catchNot reverting this yet but re-opening so it doesn't get lost.
Comment #22
nicxvan commentedGot it, I know what to do.
Comment #24
nicxvan commentedCreated a follow up here: #3574003: Properly include install files for install hook_requirements
Comment #25
berdirI'm OK with closing this again now that we have the follow-up.
Comment #27
nicxvan commented