Updating to Drupal 9.3

I always enjoy early Christmas presents, so obviously I’m super excited that Drupal 9.3 released yesterday!!

I don’t blog about every release of Drupal, but this one had a couple of oddball changes that I wanted to flag because they may be disruptive to you and your projects). Both are related to configuration management (and if you’ve read my blog at all, you know I LOVE talking about Drupal config). So let’s get into it!

Entity Reference Module

This one took me very much by surprise. After doing the Drupal 9.3 update, I did a new site install (as I usually do) to validate all of my config. And the install blew up and failed with this error:

In ModuleInstaller.php line 126:
                                                                     
  [Drupal\Core\Extension\Exception\ObsoleteExtensionException]       
  Unable to install modules: module 'entity_reference' is obsolete. 

What the what? Well, some quick Googling lead me down a rabbit hole to this Drupal.org issue: https://www.drupal.org/project/drupal/issues/2429191.

The TLDR is that there has been an effort underway for quite some time (given that I see commentary from 7 years ago on that issue) to deprecate the entity reference module and just provide this functionality in Drupal core without the need for an extra module. And Drupal 9.3 is the turning point where the module is not going to work anymore.

Obviously at some point in the past I missed an update that disabled entity_reference. Or not? I dunno. Regardless, to move beyond this it’s a relatively simple change, just remove the following from your core.extension.yml file:

entity_reference: 0 

I have created a new Drupal.org issue for this here: https://www.drupal.org/project/drupal/issues/3253622

Configuration Changes

The other fairly significant change in 9.3 has to do with “all” your configuration files. As mentioned in https://www.drupal.org/node/3230199, the configuration in your config files will now be sorted in the same way that the various module schema define that config. What I noticed was a lot of very minor config diffs as a result. No actual values changed, just the order of the config files. Which resulted in a LOT of churn in the config dump.

Is this a big deal? No. But it will make the actual update to 9.3 a bit hairy and complex, especially if you are doing active development during / around the update (because anyone doing config changes pre-9.3 will have config in one way, and anyone doing config post-9.3 will have it in a different).

So I would strongly recommend that you stop all active development to get the 9.3 update done and then resume, so that you don’t have multiple competing pull requests open where some folks are on 9.2 and others are 9.3 (that will not likely end well for your config). The good news though is that this change should result in fewer oddball config diffs in the future (which, I am very excited about).

Fatal Errors During Deployment(s)

Updated 12/16/2021: I realized as I started trying to deploy these updates into production, that I hit a fatal error:

    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to all                                                                          
    ocate 20480 bytes) in /mnt/www/html/capitalcamp/docroot/core/lib/Drupal/Cor                                                                          
    e/Config/TypedConfigManager.php on line 189    

There is thankfully a core issue / patch on this, and it will be released in core 9.3.1 in January. See https://www.drupal.org/project/drupal/issues/3254403.

Update in Practice

If you’re interested in seeing the update pull request for the GovCon site, head over to Github. Overall this was a pretty smooth update and as always, a massive thank you to the community and maintainers who keep Drupal plugging along. Onward towards Drupal 10!

Related Content