The absolute worst was Drupal's old plugin hook system that would call any function if it matched a specific pattern (not sure if it still does it)
For exampleapp_name_init()
You can't search by reference because it's never called directly. Debugging gnarly issues meant you had to dig into its libraries to know exactly which hook was being called
FWIW the procedural hooks are on their way out as of Drupal 11.1 and planning to be dropped entirely in Drupal 13 (though the specific one you mention here has been long dead since Drupal 8 and was replaced with event subscribers). They can now be an OOP methods as long as they’re tagged with a #[Hook('whatever')] attribute.
View all comments
Show parent comment
2
u/twigboy Sep 30 '26
The absolute worst was Drupal's old plugin hook system that would call any function if it matched a specific pattern (not sure if it still does it)
For example
app_name_init()You can't search by reference because it's never called directly. Debugging gnarly issues meant you had to dig into its libraries to know exactly which hook was being called