Unsere Erfahrungen bei der Vorbereitung auf Drupal 10

05.07.2023

⚠ Dieser Inhalt ist leider nicht auf Deutsch verfügbar.

When we think of the challenges facing us in 2023, then the Drupal 10 release in December of 2022 immediately comes to mind. Drupal 10 does have a lot of nice improvements, so we are very motivated to adopt it in our projects early. In this blog post, I will share our experience adopting Drupal 10 and the roadmap ahead.

If you are not familiar with the list of Drupal 10 features, there are many others who have spoken about them. Therefore, we will focus on the implementation process. Drupal 10 is indeed very exciting and promising. The drupal community did great work as usual. On the  release day, we see that even  more contrib projects are ready for Drupal 10 than was the case for Drupal 9.

Before we begin the upgrade process, we review the experience from the previous upgrade. In this case, it was the update from Drupal 8 to Drupal 9. From a developer perspective, this went really smoothly for all our projects. Sure, there were issues to be resolved, but due to semantic versioning, we were able to upgrade Drupal 8 sites to Drupal 9 without having to re-create the website and migrate the data (which is the major difficulty we have for Drupal 7 upgrades). The process was easier and we believe that the update to Drupal 10 will even be more pleasant.

Shortly after the release of Drupal 9, drunomics set a goal to make all the contrib projects which are currently maintained by drunomics to have Drupal 10 compatible releases on the day of the Drupal 10 release. Why do we do this? A specific project can only be upgraded when all the modules that are used in the project are also compatible with the upgrade. As a result, many companies had already joined this initiative for the Drupal 9 release. We encouraged everyone to get involved in contributing back to Drupal and be Drupal 10 ready. We distributed our own projects between our developers, each person becoming a maintainer of one or more modules.

drunomics launched this initiative shortly after the release of  Drupal 9.4.0 (the final minor release before the upcoming Drupal 10 release). We had 6 months to achieve our goal. It was the correct time to begin. Drupal 9.4. defined all the deprecated APIs for Drupal 10. Despite a lot of effort also being spent on development of  our Lupus Decoupled distribution, we did a good job for Drupal 10 readiness. On release day most of our maintained projects were Drupal 10 compatible.

More details about our preparation process of contrib projects.

The recommended way to check the compatibility of a single module or the entire project is by using the  Upgrade status module. Just give it a try and it will show you what to do.

If there are a lot of changes needed you can use  Drupal Rector to automatically fix deprecated code. The final step is to manually fix any remaining issues and test.

Why do we find it important to share our experiences?

Even though much of the work is already done, much remains. Despite the highest readiness level on the day of release, many modules did not achieve Drupal 10 readiness. At the moment of writing, only 47299632 (~49%) of contribution modules are Drupal 10 compatible. That statistic looks better though for the most commonly installed modules:

  • Top 1000 installed modules - 82% ready
  • Top 500 - 92% ready
  • Top 100 - 96% ready

This information is tracked by Acquia on their  Drupal 10 readiness dashboard.

It is a little early to relax. We can achieve 100%. In addition, I want to say that in most cases it is simple to become Drupal 10 compatible, and the process provides beginners an easy way to earn valuable contribution credits.

What comes next?

We at drunomics can't wait to update all client projects to Drupal 10 and start using all the new features.

So what is the plan? The drunomics development workflow follows best CI/CD practices for open-source projects. It means that we develop in smaller increments, integrate early and deploy often. To achieve this, we leverage automated testing via PHPUnit, Behat, Playwright, VRT, phpcs, phpstan, etc.

For example, deprecated APIs usage in custom code can be completely replaced since version 9.4.

Another big part of work that in most cases can already be done is PHP update. For Drupal 10  minimum required version is PHP 8.1 that also supported by Drupal 9. The helper tool that we used was  https://github.com/PHPCompatibility/PHPCompatibility

In addition to PHP do not forget to  check other system requirements like MariaDB, Redis etc. But Drupal 10 doesn't change database requirements significantly as we can see.

The last recommendation is that it's a good opportunity to check versions of other software that makes your project run even if it's not a dependency of Drupal 10. For example check if the project using a maintained version of ElasticSearch, Solr, or whatever else is used. Highly recommended to avoid using any outdated dependencies.

We prefer to not postpone such things till the end and do everything in a huge PR. It just causes extra risks and can complicate troubleshooting in case something will go wrong. 

When should you upgrade to Drupal 10? Short answer: early 2023.

Looks like 2023 is going to be a year of upgrades to Drupal 10. Drupal 9 will stay maintained and reach its EOL in November 2023.

Of course, Drupal 10 release doesn't mean that you must update immediately. But also it's highly not recommended to postpone it till the last months but better prepare everything in advance as already described above. Drupal 10 upgrade process is very promising and we expect it will be incredibly smooth and even easier than Drupal 9 upgrade. But be careful to not miss some important parts that can delay it.

(What if your hosting provider doesn't support PHP 8.1? What if some PHP SDK packages that you're using for third-party integrations don't have PHP 8.1 compatible releases or are deprecated at all? Who knows what other challenges can be hidden in your projects? Maybe you also noticed that sometimes things don't go absolutely accordingly to plan.

Better be professional, plan such things in advance and keep your customers happy as we do.

All above we describe assuming that you currently running on Drupal 9.

But let's not forget another important thing.  Statistic usage shows us that about half Drupal project is still running on Drupal 7 and  End-of-Life date for it same as Drupal 9 - November 2023

For those sites that are running on Drupal 7, please read BLOGPOST # 2