By nicxvan on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.1.x
Introduced in version:
11.1.0
Issue links:
Description:
These hooks now support OOP implementations:
- hook_module_preinstall
- hook_module_preuninstall
- hook_modules_installed
- hook_modules_uninstalled
- hook_cache_flush
Before:
/**
* Implements hook_cache_flush().
*/
function customModule_cache_flush(): void {
// Custom code
}
After:
/**
* Implements hook_cache_flush().
*/
#[Hook('cache_flush')]
public function cacheFlush(): void {
// Custom code
}
Impacts:
Module developers
Site templates, recipes and distribution developers