Objective
#1892574: Remove hook_hook_info_alter() was removed a long time ago already.
hook_hook_info()
only exists for lazy-loading legacy hook implementation code.hook_hook_info()
has architectural problems causing code to not be loaded (see related issues).ModuleHandler
apparently maintains two cache items; one for'module_implements'
, and another one just for'hook_info'
.Object-oriented code can be properly auto-loaded in D8.
Remaining implementations
- system_hook_info() (hook_token*())
- views_hook_info() (hook_views_*())
Proposed solution
Remove
hook_hook_info()
+ persistent caching fromModuleHandler
.Convert remaining affected hook implementations...
A) Either move them into .module files.
B) Or find a simple object-oriented replacement pattern.