Development

Writing custom modules and themes for Drupal 12: hooks as classes, Starterkit themes and code that survives the upgrade.

DevelopmentUpgrading

Getting custom code ready for Drupal 12

Custom modules and themes are usually what holds an upgrade back. A checklist for Drupal 12: deprecated APIs, Symfony 8, Guzzle 8, PHPUnit 12, constructors in core classes, hooks, JavaScript libraries and the info file.

DevelopmentUpgrading

Hooks in Drupal 12: from .module files to hook classes

In Drupal 12, hooks are methods on classes marked with the #[Hook] attribute, and .module and .theme files are on their way out. How to write a hook class, control the order, remove someone else's hook, and which hooks must stay procedural.

DevelopmentBuilding

Theming Drupal 12 with Starterkit

Olivero has left core, so a Drupal 12 site needs a front-end theme of its own. How to generate one from core's Starterkit with dr generate-theme, what you get, and how to work with templates, libraries and components.

BuildingDevelopment

The dr command: Drupal core's own command line

Drupal 12 has a command-line tool in core, vendor/bin/dr. It can install sites, apply recipes, install modules, clear caches, run cron, export content and create login links – without Drush. What it does, and what you still need Drush for.