Skip to main content

Updated to Drupal 9

For Drupal's 20th anniversary I thought I'd make the upgrade from Drupal 8 to Drupal 9. As far as I know nothing drastically changed in Drupal 9. But some APIs got cleaned up and some deprecated APIs were finally removed.

I thought it would be easy but when I ran composer update after having executed this:

composer require drupal/core-recommended:^9.0.0 drupal/core-composer-scaffold:^9.0.0 drupal/core-project-message:^9.0.0 --update-with-dependencies --no-update

it printed several hundred lines of problems... so I knew I was in for some fun.

The problem with composer, in my opinion, has always been that when something goes wrong you have to dig out the actual package the system has a problem with.

Long story short... what I had to do to fix it, because many people have problems with composer and Drupal 8 to 9 updates – it is by no means a painless update – was the following:

  • Remove drupal/console from composer.json. I don't even know why I had it in there because I've never used console.
  • Change image_effects to wanting a version of 3.1 or higher
  • Change admin_toolbar to be 2.4 or higher
  • Remove webflo/drupal-finder
  • Remove drush/drush
  • Add symfony/filesystem version 4.4 or higher

After hours of struggling that turned out what it was it. Then composer update ran fine.

Of course I then added drush again with composer require drush/drush

Next, the database update complained about Drupal's old core requirement that I had in my modules and theme's .info.yml files. Those went from core: 8.x to core_version_requirement: 9.x

drush updb ran without a hitch and now we're on the latest Drupal again.

Happy 20th birthday, Drupal!