Are you ready for Drupal 11 in 2024?

Matt Glaman
4 min readApr 25, 2023

Drupal 11? Yes! Drupal 11 is going to release on August 2024 or December 2024. That’s only a year and a half away when writing this blog post. So, when should we start preparing modules and sites for Drupal 11? Now! Preparing for the next major version of Drupal should not be a mad dash but a consistent process.

I’ll be presenting at MidCamp tomorrow about lessons learned from this past Drupal 10 readiness effort. While strenuous, the Drupal 10 readiness work for contributed modules went well. It definitely went faster than Drupal 9. And that is because we have better tooling and processes. Those tools and processes need more refinement as we prepare for Drupal 11.

Making sure our tools are up to date with Drupal 10 changes

One problem is that phpstan-drupal and drupal-rector quickly become outdated with changes to Drupal core. This is improving for phpstan-drupal now that Drupal core uses PHPStan. But both projects need custom code written to detect and fix changes.

One solution is a more consistent review of change records for implications to phpstan-drupal and drupal-rector. Right now, it is a retroactive process. We must look at change records from a large period and verify if the tool supports those changes. Ideally, this would be a sign-off process before a change record is published.

In the meantime, I have built a GitHub repository that imports Drupal core change records as issues. These issues can then be triaged, and we can check if phpstan-drupal or drupal-check needs work to support them. You can find the repo here: https://github.com/mglaman/drupal-change-record-triage. The repository has a scheduled workflow to parse the change records RSS feed and import entries as issues.

Change record triage issues, labeled by version and tool

Jump start on PHPUnit 10 deprecations

PHPUnit 10 has been released this year. I am assuming Drupal 11 will bump from PHPUnit 9.5 to PHPUnit 10. A lot of Drupal 10 compatibility work involved PHPUnit 8.5 to PHPUnit 9. So let’s get that taken care of earlier than later! Check out this Drupal core issue for more information https://www.drupal.org/project/drupal/issues/3217904

[meta] Support PHPUnit 10 in Drupal 10

Problem/Motivation PHPUnit 10 is going to be released on Febryary 3, 2023. We are hoping to get compatible thanks to Symfony’s PHPUnit bridge and [#3174200] which adds forward compatibility for PHPUnit 10 to existing tests. Proposed resolution Start converting the deprecated methods as possible Upstream, https://github.com/symfony/symfony/issues/45223 and https://github.com/symfony/symfony/pull/45226 allows skipping Drupal’s implementation of DeprecationListener to silence deprecations.

[meta] Support PHPUnit 10 in Drupal 10

Drupal uses the Symfony PHPUnit bridge for cross-version compatibilities. Drupal 11’s adoption of PHPUnit 10 is blocked on the symfony/phpunit-bridge component's ability to support PHPUnit 10. Follow this GitHub issue to learn more (or join in to help!) https://github.com/symfony/symfony/issues/49069.

[PHPUnit bridge] Support for PHPUnit 10.x · Issue #49069 · symfony/symfony

Description PHPUnit 10 is around the corner (possibly released next month), and it contains a complete overhaul of its internals, particularly the new event system: sebastianbergmann/phpunit#4676 T…

[PHPUnit bridge] Support for PHPUnit 10.x · Issue #49069 · symfony/symfony

What are the dependency changes for Drupal 11?

I don’t know, they haven’t been solidified. You can follow the following issue https://www.drupal.org/project/drupal/issues/3267879

[meta] Add compatibility for the latest major and minor versions of dependencies to Drupal 10

Problem/Motivation Before we can update our dependencies in Drupal 11, we need to add forward-compatibility with the new versions in Drupal 10. Proposed resolution Add compatibility for upcoming major versions of dependencies to Drupal 10 core minors, including addressing deprecations added in those versions. PHP Ensure Drupal 10 is compatible with PHP 8.2 as it evolves. Symfony Ensure forward-compatibility with Symfony 7: Address new deprecations added in Symfony 6.1. Address new deprecations added in Symfony 6.2. Address new deprecations added in Symfony 6.3.

[meta] Add compatibility for the latest major and minor versions of dependencies to Drupal 10

--

--

Matt Glaman
Matt Glaman

Written by Matt Glaman

PHP software engineer, open source contributor, and speaker

No responses yet