The Drupal 9.2 Beta 1 release dropped a few days ago and I wanted to take it for a spin. As always, I try to do these things in a way that I can share publicly and then talk about the experience (because, if I run into something and talk about it, hopefully it will help you out!).
Overall, the experience was pretty painless. You can see a draft pull request for the GovCon site over on Github if you’re interested in the diff!
What’s new in Drupal 9.2
Remember, that as of Drupal 9’s release back in June 2020 (almost a year ago, oh my god) Drupal 8 is no longer receiving feature updates. So, Drupral 9.2 represents more new exciting things in the Drupal 9 world that you will only get if you’ve updated to Drupal 9!
The biggest change I’ve seen so far in my (albeit minimal) testing is a really exciting one! Some Drupal config has been notoriously difficult to read and diff in yml files because it stretches into eternity on a single line (I’m looking at your, Webform). But! As of 9.2 this config will be split into multiple lines. You can see an example of this here: https://github.com/Drupal4Gov/Drupal-GovCon-2017/pull/944/files#diff-5a2cd7801e26d2f58afadc190e966d5e11c286ff4e7032765999aed1f5dbcd8fR2
Other updates in the roadmap so far look like mainly dependency updates (e.g. CKEditor updating to 4.16 from 4.15, etc.). I’ll keep an eye out for other big changes and report when we get closer to the release.
How to Update to Drupal 9.2
The update process on GovCon was pretty painless. Like “most” Drupal updates in the modern age it requires a few steps:
1. Update the composer definitions: in this case, I had to make 2 changes to get both drupal/core and drupal/core-composer-scaffold to ^9.2 (previously they were both ^9.1).
2. Run composer updates: I ran composer update drupal/core drupal/drupal/core-composer-scaffold --with-all-dependencies
Gathering patches for dependencies. This might take a minute.
- Upgrading drupal/core-composer-scaffold (9.1.8 => 9.2.0-beta1): Extracting archive
- Upgrading composer/semver (3.2.4 => 3.2.5): Extracting archive
- Upgrading drupal/core (9.1.8 => 9.2.0-beta1): Extracting archive
- Applying patches for drupal/core
https://www.drupal.org/files/issues/ignore_front_end_vendor-2329453-116.patch (Ignore front end vendor folders to improve directory search performance)
https://www.drupal.org/files/issues/2020-02-07/2869592-remove-update-warning-34.patch (2869592 - Disabled update module shouldn't produce a status report warning)
https://www.drupal.org/files/issues/2019-11-27/2815221-125.patch (2815221 - Add quickedit to the latest-revision route)
3. I updated my local database: for me, this was accomplished by running lando drush updb -y
lando drush updb -y
---------------- --------------------------------------- ------------- ------------------------------------------------------------------------------------
Module Update ID Type Description
---------------- --------------------------------------- ------------- ------------------------------------------------------------------------------------
file add_txt_if_allows_insecure_extensions post-update Add txt to allowed extensions for all fields that allow uploads of insecure files.
layout_builder section_storage_context_mapping post-update Update view displays that use Layout Builder to add empty context mappings.
system delete_rss_settings post-update Remove obsolete system.rss configuration.
system remove_key_value_expire_all_index post-update Drop the 'all' index on the 'key_value_expire' table.
system service_advisory_settings post-update Add new security advisory retrieval settings.
views rename_default_display_setting post-update Rename the setting for showing the default display to 'default_display'.
---------------- --------------------------------------- ------------- ------------------------------------------------------------------------------------
4. I exported configuration changes: again, in lando this is accomplished by running lando drush cex -y
5. I opened a PR and ran CI/CD (again, you can see the pass and full change log in the pull request).
In my case, I was already running Drupal core 9.1.8 so the update was quite minimal (and painless). I didn’t have much in the way of changes in the underlying composer dependencies, again, because I’ve stayed on top of the other changes in the community (so the actual 9.2 update was minimal). I don’t anticipate that BLT or Lightning or other big Acquia products would block your ability to update to 9.2 (but you should be sure).
In Conclusion
As always, it’s worth trying to do this update as early as possible. I have, in the past, stumbled into some funky issues with database updates or config changes that, once reported, ended up getting fast tracked and fixed prior to the stable release. TLDR: your experience with a major Drupal release is invaluable and anything you can do to test it BEFORE the major release drops.
To be clear, I’m not suggesting you fully deploy a beta release to any environment (I won’t be merging that PR on GovCon) but going through the motions to test the process should take less than an hour and you may stumble across some really valuable information in the process.
An overview of all the things I’ve been trying / testing to get ready for PHP 8.1.