I’ve talked a bit on the blog about IF you should go to Drupal 9 and HOW to actually do it, but I haven’t talked a whole lot about the preparation for the move. So this is that article! Let’s get into it.
Why Are We Talking About This Now
So first of all, I want to briefly address why the timing of a Drupal 9 upgrade is important if you’re currently running Drupal 8.
First and foremost, you shouldn’t have too much fomo about Drupal 9 as of right now (September 2020). Why? Well, if you’re currently running Drupal 8.9.x it’s actually the exact same as Drupal 9.0.x with a couple of minor exceptions:
deprecated code has been removed from Drupal 9
some underlying dependencies (like Symfony) have been updated in Drupal 9.
But in terms of features? Drupal 8.9.x is feature-identical to Drupal 9.0.x and will be throughout the 9.0.x release cycle.
Where things start to get interesting is when Drupal 9.1.x comes out (currently scheduled for December 2020). Drupal 8.9.x will essentially go into long-term support until next year (more on that in a moment) and only get security updates. So! The reason I’m talking about this RIGHT NOW is that it gives you a few months to start working on (if you haven’t started) and/or complete (if you have started) your Drupal 9 upgrade to get it out of the way before Drupal 9.1.x drops (and you start missing out on stuff). Once 9.1.x is out, then it’s ok to have fomo. Bcause you will actually be missing out on stuff.
Secondly, the other reason this timing is critical is that you have roughly 1 year before you will “have” to do the update from Drupal 8 to 9 (assuming you want to continue getting security updates for your website. Which you do.) Symfony 3.x goes end of life at the end of 2021. This isn’t a Drupal “thing.” This isn’t an “Acquia thing.” This is a Symfony thing! And because of that, Drupal 8.x will stop receiving support when Symfony 3.x is done.
My advise? Get over to Drupal 9 sooner than later (assuming, you’re ready) so you can start taking advantage of the new features in 9.1 and you don’t have to worry about butting up against that end of life date in 2021.
Getting Ready
I’ve already “largely” covered this topic in my “Should I Upgrade to Drupal 9” article from June 2020. Some things have shifted since then, so it’s worth talking about it.
A LOT more modules are stable in D9 today than they were this summer. That’s good! But remember, it’s not a magic wand. The bottom line is:
your custom code must be clear of all deprecated code (I recommend using tools like Upgrade Status and Drupal Check for this).
all of your contrib code must be explicitly D9 compatible.
The good news is that once your site is “ready” for the upgrade, the upgrade is super easy. Getting there, is perhaps less easy.
A Step by Step Guide
Add the Upgrade Status module to your project
Enable it
Have it scan all of your custom AND contrib code
Review the report it gives you, and do what it says!
The tricky part comes in when either you have to do a significant amount of rework on one of your custom modules and/or if one of the contrib modules you’re using still isn’t D9 compatible. If your module(s) are still not compatible, then it may be time to look for alternatives. Or it may be time for you to test out a patch. Or it may be time for you to try and write a patch to replace the deprecated code yourself!
As a general rule of thumb, I like to audit the modules I’m using on a semi regular basis. If the module hasn’t had a release in some time, or the number of users is very low (a few hundred or less), and/or there isn’t even a stable release then I like to ask myself the question, “Should you be using this module, Mike?” The NEW addition to that list of questions is: is it ready for D9?
If the answer is NO it’s not ready for D9, then my answer is almost universally NO I won’t use it. With, perhaps, a few exceptions where there are well tested patches or widely used development releases that I feel confident won’t brick my site.
Additional Information
I recently did a webinar (thanks to Drupal4Gov for having me) where we talked extensively (it’s a 2 hour webinar) about updating from both Drupal 7 and Drupal 8 to Drupal 9. I delve into how to handle the update, how to handle deprecated code, and some of the best practices you should be adopting either during (or before) the move. It’s definitely worth a watch if you haven’t seen it yet!
In Conclusion
Getting over the hump from Drupal 8.x to Drupal 9.x is only slightly more difficult than updating from Drupal 8.8.x to Drupal 8.9.x. It’s not a walk in the park, but compared to the blood, sweat, and tears you would have to go through to upgrade from Drupal 6 or 7… (or probably did have to go through, if you didn’t come to Drupal for the first time at 8.x) then it’s in a whole other league.
So that leaves us with the final question: Should you upgrade to Drupal 9?
I’m still not going to just blindly say yes. There are still reasons not to (not the least of which your site isn’t ready). But I will say these things:
you should update sooner than later (if not, perhaps, RIGHT NOW)
if you’re starting a new Drupal site, you should be starting on Drupal 9**
if you haven’t started preparing to update from Drupal 8 to Drupal 9, you should start immediately (because it could take you a while to get there, especially on complex platforms)
** A quick note on starting new sites
Given that Drupal 8 goes end of life in a year AND it stops getting non-security releases in a couple of months… this is not a good time to start building Drupal 8. At this point, I would only “start” a new Drupal 8 site if I was really, positively, 100% sure that something I needed was not available on Drupal 9.
To be clear, this is not to say I wouldn’t “release” a new Drupal 8 site right now. I am involved in a number of fantastic projects that have been under development for months and are nearing their completion / launch dates and they are Drupal 8 projects. That’s ok! I’m saying if you are starting a new project do everything in your power to do it in D9. Otherwise, you’re just going to have to do all of this upgrading business all over again.
If you DO start a a new Drupal 8 project “right now” here are a few quick pointers:
automated deprecated code scanning with Drupal Check as part of your build process. BLT does this automatically in BLT 11.x.
do not use modules in your build that aren’t Drupal 9 compatible.
An overview of all the things I’ve been trying / testing to get ready for PHP 8.1.