Preparing custom and contributed code for Drupal 9


Drupal 9 is nearly here, with the promise of allowing the same contributed and custom code to work in both Drupal 8 and Drupal 9.  This presentation will discuss some of the practical aspects of making that happen for custom and contributed code maintainers. 

The session will begin with a very brief overview of the deprecation system in Drupal 8.  It will then discuss current best practices (as of DrupalCon) on how to detect deprecated code usage in modules you maintain as well as in custom code and modules you may use in your websites. We'll learn how to prepare a Drupal 8 codebase now so that it is ready to upgrade to Drupal 9, and we will discuss what developers can do to help module maintainers be ready for Drupal 9.

The session will then talk about some practical aspects of writing code that works now, and will still work with Drupal 9, with an emphasis on best practices for a module contributor or maintainer.  Drupal 8.8 deprecated a large amount of code, and the replacement code paths are not available in Drupal 8.7 which has security support up until the day Drupal 9 is released.  We will look at specific deprecations from Drupal 8.8 and show ways to fix them while maintaining Drupal 8.7 compatibility to allow a single branch to work with Drupal 8.7, 8.8, 8.9, and 9.0. We will review ways to manage dependencies that may trigger deprecation errors.

We will then examine changes to server requirements and vendor dependencies in Drupal 9, particularly the change from Symfony 3 to Symfony 4, and how that might affect modules in certain cases and how to manage it.

Finally we will consider options for contributed module management around the Drupal 9 release and beyond, weighing the pros and cons of the different ways to ensure contributed modules work with all supported versions of Drupal core, and we will review factors that will influence this choice for various types of modules,

There will be a follow-up BoF after the session to provide an opportunity for further discussion and a Q&A session.

Learning Objectives

Identify issues in custom or contributed code that they use that make them incompatible with Drupal 9.

Prepare a Drupal 8 codebase to be ready to be upgraded to Drupal 9.

Contribute to a module to help prepare it for Drupal 9.

Target Audience

This session is for anybody who needs to write or maintain code that works with some version of both Drupal 8 and Drupal 9. .  While there will be an emphasis on best practices for module maintainers, the format will provide insight for those managing custom code, and will arm developers that manage websites using contributed modules with information they can use to help the modules they use be ready for Drupal 9


Attendees will get the most out of this session by being familiar with contributed project management on, and a basic understanding of the Drupal release cycle.


Development & Coding


back-end development
drupal 9

Experience Level


When & Where

Tuesday, 14 July, 2020 - 22:15 to 23:00
Hopin Sessions

If no timezone is set on your profile, time is displayed in UTC.
Update your profile's timezone