Time to prepare for Drupal 9 with Upgrade Status module

Blog image

Drupal keeps moving ahead. In June 2020, we hope to see the release of Drupal 9. Innovation often has a “flip side” — cumbersome upgrades. But not this time! Upgrades from Drupal 8 to Drupal 9 will be quick and easy, and this is one of Drupal 8 benefits. However, there is a condition all websites should meet — and there is a wonderful Upgrade Status module that will help them with that. 

Deprecated code removal = easy upgrades to Drupal 9

All Drupal 8 websites will have silky smooth upgrades to Drupal 9, if their core, modules, and themes are up-to-date and not using deprecated code. A very lucrative reason to migrate to Drupal 8 now if you have not yet ;)

Deprecated code is one that is no longer in use and has more modern alternatives. The functions and APIs that are marked as deprecated continue to exist alongside with these alternatives — until they are removed. The release of Drupal 9 will see a major cleanup from deprecations.

Modules and themes without deprecated code will be immediately ready for Drupal 9. Those with deprecated code should have it replaced before Drupal 9 arrives.

Dries about deprecated code and preparing for Drupal 9

Drupal creator Dries Buytaert encourages everyone to update their code to the latest and greatest APIs today — without waiting for Drupal 9. And here is where the Upgrade Status module comes in.

Upgrade Status module to check your site for deprecated code

The Upgrade Status module was developed on the basis of the powerful command-line tool called drupal-check, which scans your codebase for deprecations. 

But the Upgrade Status module makes the process handy for everyone thanks to its graphical user interface. It is easy to run the checks directly from the admin dashboard and get informative results.

There is even a chance we may see the Upgrade Status module in Drupal core someday. A fresh issue about it has been created in mid-May 2019. 

More details about the Upgrade Status module’s work & features

Installation notes 

The Upgrade Status module uses third-party PHP dependencies, so it is highly recommended to install it via Composer package manager. The Update Manager and Git Deploy modules will also need to be enabled. When installed and enabled, the Upgrade Status module’s UI is available at /admin/reports/upgrade.

Checks for deprecated code

The module will scan your core, contributed, and custom modules and themes and tell you which ones have deprecated code. 

It tells the “status” of each project, which is either “No known errors” or “Errors found” (with their amount). When you click “View errors,” you are taken to the page with the information about the particular deprecated function or API.
 

Upgrade Status module to prepare for Drupal 9

Checks for available updates

It also shows you the available updates for contributed projects. These updates are highly recommended because Drupal projects’ maintainers resolve deprecation issues with time. 

Drupal's developers who find deprecated code in a contributed project can also create an issue on drupal.org (if it does not exist yet) or help with patches.

Checking the whole site or particular projects

In addition to the full check, the module also allows you to check individual projects. You can also rerun the report on specific projects that you are currently working on. So you can avoid spending a long time to run the full check. This was mentioned among the module’s benefits in the blog post by one of its main creators — Gábor Hojtsy.

Handy reporting

The Upgrade Status module allows you to export the full report about the check or individual reports for projects.

Continuous integration opportunities

The module cannot be integrated with your continuous integration processes for now. However, the tool behind it, drupal-check, is suitable for this purpose. So the status check can be part of your automated workflows. 

Prepare for Drupal 9 with the help of our team!

So what will be the upgrade status of your website? It’s time to find out!

If you need any help with using the Upgrade Status module or with cleaning up your website from deprecated code, our team of Drupal experts is there for you.