Drupal 9 is just around the corner and the beta release is out to be tested already! What’s your Drupal 9 plan?  Are you still in the “Why should I upgrade to Drupal 9 after all” phase? Or are you wondering what your next steps should be for Drupal 9 readiness? We have answers to all your questions including Drupal 9 features and a quick Drupal 9 checklist on how to prepare for Drupal 9.

The best way to prepare yourself for tomorrow is to give your best today. And very apparently, the Drupal community has done just that. I know, migrating to Drupal 8 from previous versions was hard. It meant a complete rebuild of the code and a lot of learning. But once you are fully onboard Drupal 8, life gets easier. Think of it as a hard climb for a gorgeous view from the mountaintop. Truly worth all the effort, isn’t it? So, if you’re still on Drupal 7 (or 6), this is a good time to migrate to Drupal 8 and then simply upgrade to Drupal 9 from there. As you read this, modules are being ported (and made compatible) to Drupal 9 as a collective effort by the amazing Drupal community.

drupal 9 readiness

The Much-Talked-About Drupal 9 Release Date

One of the most frequently asked Drupal questions lately has been about the Drupal 9 release date. So, when is the most-awaited Drupal 9 release date? Drupal 9 is currently scheduled to release on June 3rd, 2020. The Drupal community has been successfully releasing minor versions every six months since the adoption of semantic versioning in Drupal 8. Every minor version came with several valuable new features. 

Drupal 8 extensively depends on third-party libraries like Symfony, Twig, Guzzle, CKEditor and must keep up pace with their updates as well. For example, Symfony 3 (Drupal 8’s biggest dependency) will reach EOL (end of life) by November 2021. Drupal 8 reaches end of life as well. Drupal 9 will be released with the latest Symfony 4.4 support and will not be backwards compatible with Symfony 3. 

Drupal 9
         The Drupal 9 Readiness Roadmap (Image Credits – Drupal.org)

Drupal 9 Features - What’s New in Drupal 9?

Here are some key features of Drupal 9 that we will be discussing about in detail thereafter –

  • Easy to upgrade to Drupal 9 (if already on Drupal 8)
  • You get the latest of the best! (Symfony, Composer, Twig, PHP, CKEditor and more)
  • Will receive community support and security fixes after November 2021 (after Drupal 8 EOL)
  • Subsequent Drupal 9 minor upgrade versions will be backwards compatible to Drupal 9
  • Drupal 9.1 will have an all new and modern default theme called Olivero to offer 
  • Many exciting features and enhancements to look forward to, starting Drupal 9.1!

Drupal 9 is already being built within Drupal 8. Drupal 8.9 will release along with Drupal 9.0 in June 2020. This is because Drupal 9 is going to be the same as Drupal 8.9, except that it will be a cleaned-up version that is updated with support for its third-party dependencies. And hence one of the greatest Drupal 9 features is that it is so easy to upgrade!

Every new minor version of Drupal 8 saw many new features , but it also contained a lot of old code so it could be backwards compatible. This “old code” is also famously known as “deprecated code”. Because of the dependencies on third parties like Symfony, Twig, etc., Drupal 9 will incorporate updates to these dependencies. Drupal contributors and module developers are collectively making the road to Drupal 9 easier by eliminating “bad smelling code” (as Jacob Rockowitz calls it in his blog about deprecating code for his Webform module) from various Drupal 8 modules.

       Drupal 9.0 = Drupal 8.9 – Deprecated code + Upgraded dependencies

Drupal 9
          What’s new in Drupal 9.0 (Image Credits - Drupal.org)

The Drupal 9 Readiness Checklist

Regardless whether you’re upgrading from Drupal 7 to Drupal 9 or Drupal 8 to Drupal 9, you will need to start planning for Drupal 9. The scheduled release is soon approaching and now is a good time to get prepared for Drupal 9. 

  • Drupal 7 to Drupal 9 Migration

If you are still on Drupal 7 and looking forward to getting onboard Drupal 9, it is not too late. Ideally, it is recommended to split this process into two parts – 1. Migrate to Drupal 8 and 2. Upgrade to Drupal 9. 

  • Migrate content and code to Drupal 8
  • Check for availability of modules in Drupal 8 using the Upgrade Status Drupal module
  • Upgrade your Drupal 7 modules to Drupal 8 with the help of modules such as Drupal Module Upgrader
  • Stay updated with the latest core releases.
  • Remove any deprecated code
  • Upgrade to Drupal 9

And as already discussed, upgrading from Drupal 8’s latest version to Drupal 9 is easy as pie. A Drupal 7 to Drupal 9 migration will take as much resource time (and resource budget) as a Drupal 7 to Drupal 8 to Drupal 9 upgrade. Drupal 7 will reach end-of-life by November 2021 and will continue to receive community support until then. For detailed instructions on how to install Drupal 9, check this article.

  • Stay Up to date with Drupal 8

With every new minor version release of Drupal 8, the benefits are not only restricted to access to new features and enhancements. It also takes you one step closer to Drupal 9. Since Drupal 8.8 is the last minor release before the Drupal 8.9 release (which also happens at the same time as Drupal 9!), it is the last Drupal 8 version to contain significant feature additions. Drupal 8.9 releases on June 3rd, 2020 and will include more stable modules (that were previously experimental) and a few UX and API enhancements. So, the best thing to do now is to keep Drupal core updated and update your website to Drupal 8.8.  

  • Weed out the Deprecated code

Make way for new and improved Drupal 9 features by removing old and deprecated code from your Drupal 8 codebase. When you keep Drupal core and contributed modules up to date, you are also embracing cleaner code. Updated versions remove usage of deprecated code and API. There are various methods to check for deprecated code. 

  • Sometimes functions are marked with @deprecated annotations that warn the developer that the following code is deprecated and what they should be using instead. 
  • Use a command-line tool like Drupal Check (by Matt Glaman from Centarro) to help check for deprecated code and other bugs. It can also be integrated in continuous integration environments.
  • Download the Drupal 8 Upgrade Status module on top of Drupal-Check for a more UI based solution. It can scan your entire Drupal project and generates a clean visual report that illustrates any compatibility issues, the need to upgrade modules to the latest version and Drupal 9 readiness. 
  • Drupal.org also offers support to check for Drupal 9 readiness and deprecation within its testing system. Like enabling static analysis with phpStan or by setting a trigger_error() when a deprecated level is reached.

    Once identified, it is time for some manual work to remove the deprecated code and refine existing codebase. Use automated tools like Drupal 8 rector to resolve some code issues, although it does need some manual intervention.
Drupal 9 Checklist
                                     
                                                   Drupal 9 Checklist
Shefali ShettyMay 12, 2020