What about updating custom modules and themes?

Yesterday's email was about using Drupal Rector and the Automated Project Update bot to update contributed modules.

But what about custom modules within your application?

To do this, I use the drupal-check tool, which is built on PHPStan, and the Upgrade Status module.

They scan your custom modules and themes and report any deprecated code within your custom projects - i.e. code that will be removed in a future major version - and tell you what new code to use instead.

Once you've removed any deprecations, your module or theme will be ready for the next major version of Drupal.

This is the approach I've used to upgrade numerous websites between major modern versions of Drupal, making small updates to existing code instead of having to rewrite it from scratch.

- Oliver

P.S. There's less than a year until Drupal 7's end-of-life date. Plan your upgrade to Drupal 10 now!

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.