Member-only story
My first livestream, and upgrading to Drupal 9
On Sunday I did my first live stream where I upgraded my personal site to Drupal 9. It was a fun experience and I learned a few things — both for streaming and upgrading.
I managed to deploy a broken version of my site because I blindly trusted Composer metadata would prevent incompatible modules from allowing Drupal 9 to install. I was wrong. I forgot to use the Upgrade Status module to check if all of my contrib modules were compatible. I forgot to test the deploy and upgrade locally. 🤦♂️ Oops. Everything is fine, now. I had to make a fork of Disqus and Media Entity Browser.
Upgrading to Drupal 9
The biggest blocker I had was drupal/console
. Drupal Console is not compatible with Drupal 9, and you must remove it when trying to upgrade. You also need Drush 10, but that's an easy change to make.
In the end, this was my Composer command to update to Drupal 9 (including two modules which conflicted with version constraints, and I have fabpot/goutte
as a direct dependency for some integrations.)
composer update drupal/core-composer-scaffold \
drupal/core-recommended \
drupal/core-dev-pinned \
drush/drush \
composer/installers \
fabpot/goutte \
drupal/swiftmailer \
drupal/honeypot \
--with-dependencies
Unfortunately, I deployed this and the CodeSnippet CKEditor plugin module crashed my site, as it tried to use the removed EntityManager service. I don’t know why Composer allowed Drupal 9…