Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Drupal 8 End-of-Life and Drupal Rector

Parent Feed: 

Drupal 8 will reach its end-of-life on November 2, 2021, before the release of Drupal 9.3.0, due to Symfony 3's end-of-life. If you are Using Drupal 8, you must upgrade to Drupal 9.2 to keep your site secure. 

What this means: that all of your contributed modules and custom code need to be Drupal 9 compatible in order for you to make the update. While most of your code from Drupal 8 will still work, functions, classes, and methods that have been deprecated must be updated. For more information, here's the Drupal deprecation policy

Fortunately, the most common deprecations can be updated automatically via Drupal.org's "project update bot" or by using Drupal Rector, a tool that's designed to help automate Drupal code updates. 

Status of the most common code deprecations, as compiled by Acquia
Image: Status of the most common code deprecations, as compiled by Acquia


These automated tools can correct a majority of PHP code issues associated with the upgrade to Drupal 9. 

While most of the information to date about using Drupal Rector has been written from a developer perspective, in this post, we'll put on our project (or product) manager hats and see what it means for your project. 

First, let's set a common scenario:

  • As a project manager, you are responsible for scheduling maintenance and upgrades to your portfolio of Drupal sites and applications
  • Drupal 8 end-of-life is set for 2 November 2021
  • Moving to Drupal 9 compatibility as soon as possible guarantees the best return on your investment in the platform
Picture2

With these factors in mind, what does Rector mean for your project? Let's take a look:

  • Rector is a set of tools for automatically updating the PHP code that runs your Drupal site, and is specifically targeted at Drupal 9 compatibility
  • Your development or support team can use Drupal Rector to help prepare your site for Drupal 9 (and, as of this writing, Drupal 10!)
  • Your team can contribute to the health and stability of the Drupal project by contributing to Drupal Rector


What might a project plan look like? First, look at the resources you have. If you have developers, they can take one or more of the following steps:

  • Create new Rector rules for use by all Drupal developers
  • Use Drupal Check or Upgrade Status to get a list of deprecations in your current code
  • Use Drupal Rector to apply updates to your custom code
    • Drupal Rector can generate code updates for your custom project code, saving developer time. While not all issues can be fixed automatically, more than half of modules tested can be fixed simply with Rector
       

At Palantir, we have focused on Step 1 in order to enable our Managed Support team to perform Steps 2 and 3. We work in Kanban sprints with a small team, and we have seen measurable progress in as little as a week.

Taking such a proactive approach as a project manager is a great way to ensure continued project success. As Drupal 8 will likely no longer receive community support after Q4 2021, taking proactive steps to support Drupal 9 now will save your organization time and money in the future. It is also a great opportunity to contribute to the Drupal project and get organizational credit for doing so.

Photo credit: Carl Heyerdahl on Unsplash

Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web