Refactor to #[Hook]
30 Sep 2026, 3:00 pm (UTC)
45 Minutes
Speakers
Drupal 11.1 allows most hooks to be implemented as methods on classes using #[Hook], replacing procedural hook implementations. The approach supports code organisation and testing through dependency injection.
The session demonstrates implementing hooks this way and refactoring existing code, with the goal of keeping it compatible with future Drupal versions.