If you maintain a Drupal module, hook conversion is the modernization task most likely to land on your plate, and it's more approachable than it looks. This session is built around the migration itself: we take a procedural hook everyone recognizes, move it out of the .module file, and rebuild it as a class with proper dependency injection, then work up to the trickier hooks that need more than a straight port.
From there we get to where the real work is, starting with backward compatibility: how to keep your new hook classes working on older sites, all the way back to Drupal 10.1, using the #[LegacyHook] bridge so a single codebase serves Drupal 10, 11, and 12 without firing hooks twice. We also cover registering hook classes across core versions, and handling the change that stops auto-loading .inc files, which can leave token and views hooks silently dead. We finish with the work that travels alongside the conversion, from the test and tooling changes that ride along to the tools that do most of the heavy lifting (drupal-rector and a lightweight DDEV-based converter), leaving you a repeatable playbook you can run module by module.
Procedural hooks still work today, but they're on their way out, with removal planned for Drupal 13. That turns hook migration from good housekeeping into a deadline. The good news: start now and it's a steady, manageable task instead of a scramble later.