Problem/Motivation

OOP hooks have taken quite the journey.
This is a meta of meta's to document the journey for providing support, converting, and cleaning up hooks

Many of these issues are closed, some are open and some are sub meta's

List of issues:
OOP available #3442009: OOP hooks using attributes and event dispatcher
system_page_attachments #3487971: Convert system_page_attachments to OOP
system_theme #3488176: Convert system_theme to OOP and handle install time call
Clean up module installer calling module handler #3486995: Clean up how ModuleInstaller invokes hooks around installing other modules.
Initial hook ordering problem #3484754: Ordering of hooks needs some attention and #3479141: Implement FormAlter attribute and #3485659: Remove HookOrder
Sub Meta for additional hooks #3472165: [Meta] Track support for Install and Theme hook implementations to OOP
Install time that module handler can manage #3486462: Support #Hook for several hooks called by ModuleInstaller
template_preprocess #2340341: Move template_preprocess, _template_preprocess_default_variables into services
template_preprocess_HOOK #3501136: Explicitly register template_preprocess callbacks in hook_theme()
hook_preprocess and hook_preprocess_HOOK #3495943: Handle module preprocess functions as OOP hooks
OOP ordering and hook_module_implements_alter RemoveHook and ReorderHook #3485896: Hook ordering across OOP, procedural and with extra types i.e replace hook_module_implements_alter
hook_hook_info #2233261: Deprecate hook_hook_info groups, mark hook_hook_info() for deletion
Replace hook_requirements #3409372: [meta] Replace hook_requirements() with OOP classes
Create class for install phase hook_requirements #3490843: Create class to replace hook_requirements('install')
Create hook_runtime_requirements and hook_update_requirements and alters #3490841: Create hook_runtime_requirements() and hook_runtime_requirements_alter()
Meta convert hook_requirements #3490845: [meta] Convert hook_requirements to new class or hook_update_requirements or hook_runtime_requirements Missing sub issues
Deprecate hook_requirements #3490846: Deprecate hook_requirements
Post cleanup #3493453: [meta] Standardize and clean up hook classes in core
Mark as converted #3494908: Set skip procedural scanning for all modules in core some follow ups and not completed
Meta template conversion #3504381: [meta] Convert Template Preprocess hooks to OOP equivalent
Implementation list improvement #3519561: Introduce ImplementationList objects per hook, to simplify ModuleHandler
Remove events #3506930: Separate hooks from events
Main Conversion issue #3483599: Convert all procedural hook implementations to Hook classes
Second conversion #3533049: Bulk convert the remaining hooks to OOP
Node module conversion #3532204: Move preprocess functions into NodeThemeHooks
Gather preprocess in 11.1 #3524716: [11.1] update gather rules to manage hook preprocess
Track test modules #3488051: [meta] Post OOP hook conversion test module cleanup
Remove support for extending hook attributes #3523109: Remove support for extending #[Hook] and remove classes extending it #[FormAlter] and #[Preprocess]
How to do form callbacks properly #3514161: Better document how form submit callbacks should be called
Improve class summary line #3489096: Improve class summary line for Hook classes

BC stubs in 11.1 #3512835: [11.1.x] Add BC stubs for Hook ordering.
FormAlter (Removed) #3479141: Implement FormAlter attribute
Entity hook attribute (won't fix) #3496179: [pp-1] Implement Entity hook attribute
Generic alter attribute (won't fix #3520595: [pp-1] Create generic Alter Attribute
hook_schema #3221051: [meta] Replace hook_schema() implementations with ::ensureTableExists() and #2371709: [PP-x] Move the on-demand-table creation into the database API
hook_update_N and hook_update_last_removed #3167625: Deprecate/replace hook_update_N() in favor of an object-oriented approach similar to Laravel migrations

Steps to reproduce

N/A

Proposed resolution

Remaining tasks

Gather issues
Organize issues
Narrate issues

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Issue summary: View changes

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.