Getting Ready for Drupal 9

As planned, June 3, 2020 is the official release date of the first stable version of Drupal 9, with support through November 2021.

While the migration from Drupal 7 to Drupal 8 was very challenging for developers — since the CMS was essentially rebuilt to adopt the object-oriented paradigm using Symfony components — that will no longer be the case with Drupal 9, which follows the same logic as its predecessor.

What's new in Drupal 8.8

The minor updates to Drupal 8 Core have brought several improvements in content formatting and various backend APIs. Here are some highlights from version 8.8:

  • The introduction of the Layout Builder module and improvements to media management (integration of media in WYSIWYG editors), giving users easier access to media within Drupal.
  • A new experimental admin theme (Claro), which is responsive and part of the UX improvement initiative for the admin interface.
  • Significant improvements to the JSON:API module in Core, particularly the addition of new cache layers that reduce API response time by reusing computed and cached results.
  • jQuery is being progressively dropped from Drupal, with the CMS moving toward other JavaScript technologies to become more extensible and interactive.

What's new in Drupal 9?

As discussed above, Drupal has been introducing new features and improvements to Core via minor releases within the same major version. Drupal 9 will follow the same strategy.

Even though the upgrade from Drupal 8.9 to Drupal 9 will be faster and more automated with Composer, you will still need to manually remove deprecated functions and APIs to ensure clean, compliant, and functional code in Drupal 9.

Note: It is recommended to use command-line tools that automatically detect the use of deprecated functions in your modules and themes, such as:

Also notable is the important shift to Symfony 4 and Twig 2.0 in version 9, which will make the CMS more powerful and performant.

Steps to upgrade from Drupal 8 to Drupal 9

  1. Ensure your project environment meets Drupal 9 prerequisites:

    • Apache: at least version 2.4.7
    • PHP: at least version 7.3
    • MySQL: at least version 5.7.8
    • Drupal 9 requires Drush version 10
  2. It is recommended to upgrade to Drupal 8.9 before moving to Drupal 9.
  3. Update all contrib modules and themes used in the project before updating Core.
  4. Update custom modules to be compatible with Drupal 9: (moduleName.info.yml core_version_requirement: ^8 || ^9).
  5. Update custom module and theme code to comply with Drupal 9 (see Note above).
  6. Run the upgrade with Composer: composer update drupal/core --with-dependencies (see detailed guide on drupal.org).
  7. Run update.php.

Conclusion

As we have seen, there are not many steps required to prepare your site for Drupal 9, and the good news is that you can start now and be ready on the day Drupal 9 is released 😉.