Drupal

Preparing for Drupal 9.1: Testing the Alpha Release

Hello Drupal folks! I’m back after a week of vacation and I wanted to start my first post back by a look ahead a few weeks to the Drupal 9.1 release.

I know, I know, Drupal 9.0 JUST CAME OUT (and it did). Blink and you’ll miss these releases. You can read more about the cycle here. But TLDR a new minor version of Drupal comes out roughly every 6 months. This also means that Drupal 8.8.x will lose security support when 9.1 releases.

Where are you today?

As with many of my other posts related to doing an update… Updating to Drupal 9.1 is going to be varying levels of difficult depending on where you are today on your platform.

  • Drupal <7: there is no upgrade path! You’ve got to rebuild. More on this here.

  • Drupal 8.x: there IS an upgrade path, but I would suggest upgrading to Drupal 9.x first

  • Drupal 9.x: there IS an upgrade path and it should largely be NBD.

Assuming the third scenario (you’re already on Drupal 9.x) then this is a pretty “minor” update. Does that guarantee it will go smoothly? NO! Does it mean it should be pretty safe? YES! I would, as always, recommend you do some testing.

Testing the Update

To test the update, there are a few things you’ll need to do. The most direct is to update your composer.json’s definition for drupal/core to allow ^9.1, then run composer update drupal/core --with-all-dependencies. It is out of the realm that this will fail.

If it fails, then use the composer why-not drupal/core ^9.1 command to understand what in your codebase is blocking you. It could be that you will need to update something else (e.g. Acquia Lightning recently made an update to allow folks to safely update to Drupal 9.1).

So, two scenarios:

  1. you have a package blocking your update and you have to update that package (or those packages) to update to Drupal 9.1.

  2. you have a package blocking your update and even the most current version of that package doesn’t work with or support Drupal 9.1.

In scenario 2, there are a couple of things to consider. First, you should check on Drupal.org for the project and make sure there is an issue open (or recently closed) that addresses the issue. If so, great! If not, I would open one ASAP. Second, you can “fake” your way to Drupal 9.1 as a test case.

Composer allows you to alias “something” as “something else.” For instance…

"drupal/core": "9.1-alpha1 as 9.0.7"

This will install the Alpha, but for dependency calculation it will treat drupal/core as being 9.0.7 instead of the alpha1. I very strongly do not recommend doing this for reals, but doing it as a test case is A’OK.

The next thing to do after actually updating the code should look familiar. Check for database updates. Check for configuration changes. With Drush, this can be done in 2 commands:

  1. drush updb -y

  2. drush cex -y

I personally recommend testing both the clean installation use case (which might be useful for your continuous integration processes) AND you site update use case (meaning you already have a database with your existing content, configuration, etc. locally where you can run the updates).

I also hope you have automated testing that you can execute against the site after you’ve performed the update.

From here, it’s largely a waiting game. Once Drupal 9.1 comes out in early December, assuming you’ve safely done the update during this early access phase (and haven’t found problems) then you can safely pull the trigger and do the update!

If you haven’t, everything I’m posting here is still going to be relevant once Drupal 9.1 comes out in December. The biggest reason to do some testing now? It’s always useful to find problems well in advance. I actually found a problem a couple of days before one of the Drupal 8.x minor releases in 2019 because of doing testing just like this. The core team rushed a fix and it was added to the stable release (after being found in the beta). The more sites that test the update, the more safe and secure the update is going to be!

Happy updating.


Related Content

Tutorial: Using the Plugin System in Drupal 9: Creating Custom Views Fields

Tutorial: Using the Plugin System in Drupal 9: Creating Custom Views Fields

The Plugin System is widely used in Drupal to allow you to build your own custom “stuff” like Blocks, Migrations, Views Fields (and filters and access control handlers), and much much more! This article digs into using the Plugin System to build a custom Views Field for Drupal 9.

Webinar Future Proofing for Drupal 9

I was fortunate to have been able to present a free webinar later this month on Thursday, August 20, 2020 from 2pm - 4pm EST on Future Proofing for Drupal 9!

A similar workshop was presented last year at Acquia’s Engage conference in New Orleans and was positively received. Topics covered include:

  • Preparing for the actual update (steps to take before you update)

  • Make sure the update doesn't break : all_the_things on your existing site / platform

  • Utilize best practices to make the update easier.

We’ll be examining the update and migration process from older versions of Drupal (6/7) AND Drupal 8!

Mike Madison of Acquia will take you through the ins and outs of getting ready for Drupal 9 through future proofing your sites. Attendees will learn how to: ...

I want to give a special thanks to Drupal 4 Gov for inviting me back to do this webinar! Drupal 4 Gov sponsors this webinar series throughout the year and Drupal GovCon, usually held onsite in Bethesda, Maryland at the National Institutes of Health (NIH). Although, this year, DGC will be entirely remote on September 24th and 25th, 2020. I just learned this week that two of my sessions were accepted to the conference. I’ll be giving an introduction to using IDEs (My First IDE) and a tutorial in setting up Automated Accessibility Testing using Pa11y. I’ll share more information on these sessions here on the blog once I know the schedule. Again, this is a totally free conference and one of the largest Drupal camp’s in the US and this year it’s totally remote due to Covid! Take advantage of the fact that you don’t have to travel to Washington DC to enjoy the content.