Accessibility

D9 is coming! What do I do?!

Filed under:

Strategy, Tech
What does this mean? How can we afford a migration so soon? When do I need to have this done by? What about the modules? We are here to help!
Bree Benesh 3

Bree Benesh

VP of Technology
In high school, Bree taught herself to build websites so she could keep in touch with friends whenever her military family moved from place to place. From there she crafted…

Drupal 9 drops on today (June 3, 2020)! Upon hearing those words, I’m willing to bet you fall into one of two camps:

You either feel like this:

“Heck yeah! Bring it on! I cannot wait to upgrade my sites and get us on the D9 track!”

OR you feel like this:

“But we JUST moved to D8! (Or D7  😬)”
“What does this mean? How can we afford a migration so soon? When do I need to have this done by? What about the modules? WHAT ABOUT THE MODULES?!?!?!”

I’m here to talk to that second group of people. I know, I know, 2020 has already given us so much: massive bushfires in Australia, global unrest, and a lovely little virus called COVID-19, to name a few. The last thing you need added to this pile of fun (aka raging dumpster fire) is a traumatic upgrade, amirite? But here’s the trick: it doesn’t have to be a traumatic upgrade. In fact, this is widely promised to be the easiest upgrade in a decade.

Everything’s going to be ok. Take a breath, walk with me, and I’ll tell you some things you should know about the D9 upgrade as well as our recommendations for how to tackle it.

WHAT YOU NEED TO KNOW

If you are on Drupal 8, you have until November 2021 to upgrade. But yes, you HAVE to upgrade. D8 is going EOL (that means End of Life) and there is no negotiating with that date. The reason this date is fixed, and one of the main drivers behind the upgrade, is that multiple core dependencies need to be updated: Symfony is moving from 3.4 to 4.4, Twig 1 is being replaced by Twig 2, PHPUnit 8 is getting support while 7 is being dropped, just to name a few. And these upgrades are more than just a move to the best and latest versions of tools; in many cases, the version D8 relies upon is hitting end of life, and remaining on D8 past the EOL of its supporting libraries would open you up to security vulnerabilities. So, friend, yes you have to move. But you have over a year to do it. To read more about why Drupal 9 and why now, you can start here: Why do we plan to release Drupal 9 in 2020? | Drupal guide on Drupal.org 

If you are on Drupal 7, you also have until November 2021 to upgrade. Here’s the bad news: the upgrade from 7 is much more difficult than the upgrade from D8. It will be an endeavor you need to scope out and plan thoroughly, and it may require serious refactoring to rebuild your current site on D8. Some of the modules in D7 didn’t make it into D8 — in some cases, there are new, better modules to switch to, but in other cases, there may be no easy 1:1 replacement. Likewise, for your custom code, a lot of it could need significant rework to become D8 compatible.

And now, here’s some good news: there will be commercial support of D7 until at least 2024. What does this mean? It means that there are commercial partners who have signed up to continue supporting security updates for Drupal 7. They are going to work closely with the Drupal security committee to roll patches and release updates, and any work that comes out of this partnership is required to be made public so that everyone in the Drupal community can benefit from it. This should provide some relief for everyone out there wondering how dire their circumstances might be if they are forced for reasons beyond their control to delay their upgrade. But those same people should note that this will likely not be identical to the current level of coverage and updates provided for D7. This is more likely to follow a similar path to that of Drupal 6 LTS (Long Term Support) in that these commercial partners will release updates for modules their paying clients are using, and not for any old module out there. This means that the likelihood of you benefiting from these updates is high so long as you are only using very popular D7 modules — and the more obscure your module, the less likely you are to receive any security updates for it. So, here we have some mitigation of risk but not complete mitigation of risk. It’s something you need to think through seriously when planning your path forward. If you think you are stuck on D7 for the long haul, it could be a smart idea for you to employ a vendor who has been approved as one of the D7 ES (extended support) commercial vendors by the Drupal Security Committee. If you want to go down this rabbit hole, you can start here at the Drupal 7 Vendor Extended Support Issue Queue: D7 Vendor Extended Support Announcement Thread #2999153 | Drupal.org. If you want to read more about the plan for D7 after D9 is released, you can start here: What happens to Drupal 7 after Drupal 9 is released? | Drupal guide on Drupal.org. 

SO NOW WHAT?

All right, so now you know more about versions and timelines and reasons for the release of Drupal 9. Next, let’s talk about how to tackle planning for this upgrade.

If you are on Drupal 7, as I mentioned above, this upgrade is not a trivial thing. If you are like most of our clients, you very likely need to start looking at hiring a vendor to help you migrate your site over. You’ll need to look at your modules and see what their D8 status is: do they have D8 versions? Have they been replaced with different modules? Do they have no analogous D8 counterpart whatsoever? How much custom code do you have on your site? How many content types and taxonomies do you have on your site? Do you have integrations with external platforms? All of these things play into determining the level of effort for migrations. At this point, many of our clients face a decision: Do we migrate everything as is (as much as possible), or do we take this opportunity to redesign our presentation layer and rearchitect our backend system? It’s a big decision, and there is no one right answer. Here at Taoti we have helped many of our clients make the transition from D7 to D8, and in the process navigate this inflection point to determine the best use of their time and budget, and how much change is supportable based on the many internal factors that inevitably come into play (budget, timeline, major events, internal stakeholders, the long term vs. the short term, etc.). This topic could be an entire blog on its own — and in fact, many have written on the subject.

Pivoting back to Drupal 8, the move from Drupal 8 to Drupal 9 is being touted as the easiest [Drupal] upgrade in a decade. If you’re like me, you’re skeptical. Easy? How easy? How much time and money will this cost me? All right let’s get real here.

First of all, it is entirely possible that this could be a seamless upgrade. Whether it is or isn’t will be largely determined by two things: your contrib modules and your custom code.

Contrib Modules:

Now, luckily, we are in amazing shape in the contrib module landscape — especially compared with how things went during the move to Drupal 8. If you check out the Deprecation Status tool (Project deprecation status | Acquia Developer Center) put together by Acquia, you’ll see that over 50% of all 9,000+ D8 contrib modules are either already D9 compatible or are only a tiny change away from D9 compatibility, and 81% of the Top 200 modules are already D9 compatible (this data is current as of May 28, 2020) That’s crucial! It means that for many of us, our contrib modules will be the lesser of our worries in regard to blockers in the path to upgrade.

Custom Code:

The ultimate wildcard is how much custom code is on your D8 site, how long ago it was written, and whether it’s been refactored to remove deprecations since it was first written. This factor could potentially cause you a lot of pain. Our more recent D8 builds here at Taoti have made use of automatic tests in our CI (Continuous Integration) deployment process to ensure that all code pushed adheres to D9 compatible coding standards. Therefore, in theory, all our recent custom code should be D9 ready already. Of course, the real proof is in the pudding, but I think this advanced work will mean that we face far fewer changes in order to get these sites upgrade-ready. If theory holds true, our upgrade work on these more recent builds will consist mainly of a few known final changes and some solid QA.

OK, BUT WHAT’S THE PLAN?

I’m going to outline a general approach here to help you wrap your head around all of this information and what to do next on your D8 site: 

 In a perfect world, this is the basic outline of a D9 upgrade. 

  1. Update core to the latest D8 version 
    • (Helpful tip: you can upgrade to D9 from 8.8 or 8.9) 
  2. Update contributed modules until they are D9 compatible 
    • (Helpful tip: contrib projects can now be compatible with 8 and 9 at the same time) 
  3. Update Drupal core to D9. 
    • (Helpful tip: It should go without saying, but after you upgrade you should QA, QA, QA!) 
  4. DONE! Celebrate!!!!  

 Incredibly easy! But likely only the reality for a portion of us.  If you don’t live in a perfect world, here is what I imagine to be a fairly realistic and common scenario: 

1 – Install the following tools:  

  • Upgrade Status | Drupal.org: Install this module on your D8 site to assess D9 compatibility and identify blockers. What does it do? 
    • It checks your system requirements to make sure your server is D9 compatible  
    • It checks your Drupal core version 
    • It checks your contrib projects and helps you update them to D9 supported versions 
    • It checks your custom code and helps you identify the use of deprecated APIs  
  • Upgrade Rector | Drupal.org : Install this module on your D8 site to help fix deprecations in your custom code. What does it do? 
    • Checks your custom code and offers easy automated code fix suggestions. Note: Upgrade Rector is composer-only. You need a dev for this one! 

2 – Upgrade your system to match D9’s requirements – You may need to upgrade some of these before you even update to Drupal 8.8/8.9 or update any of your modules. It depends on how out of date your core and contrib modules are. If you are not on at least PHP 7.2, upgrading to Drupal 8.8 could break your site.  

  • Helpful tip: D9 System Requirements 
    • PHP 7.3+ 
    • MySQL 5.7.8+ 
    • MariaDB 10.2.7+ 
    • PostgreSQL 10+ w/pg_trgm extension 
    • SQLite 3.26+ 
    • Drush 10  

3 – Update Drupal to 8.8 or 8.9 (if you have been keeping up with your updates, this should be easy. We update our clients regularly, so we never find ourselves in a situation where a site is multiple versions behind the latest core release.) 

4 – Upgrade contrib modules – Based on recommendations from Upgrade Status, apply all the available updates providing D9 compatibility   

5 – Remove deprecations from your custom code – Based on autosuggestions from Upgrade Rector, remove any uses of deprecated APIs from your custom code.

6 – At this point, you have spent a fair amount of time prepping, updating requirements, and checking things, but it (hopefully) hasn’t been a gargantuan effort, and you are now either:

  • Ready to upgrade to D9! Yayyyyy! Do it, QA the heck of out it, and then Party!
  • Stuck. Crap. Why are you stuck? Likely you have modules, either contrib or custom, which need further work in order to be compatible with D9. Maybe your contrib modules are in need of fixes (either simple or complex) that are beyond your ability to implement? Maybe you have a ton of custom code powering some complex functionality, and it needs deep refactoring in order to remove any deprecations and make it D9 ready? Either way, you need to step back and —

7 – Analyze LOE for upgrading.  

  • Outline which contrib modules are still not D9 compatible, and if possible, identify what level of fix is needed. Is it just a one-line update to the info.yml file? Are there patches already available that just need to be applied? Or are there deeper issues? 
  • Outline which parts of your custom code need refactoring, and if possible, identify what level of effort is entailed in remediating them. This could be easy to do, or, if you have a ton of spaghetti code on your site, it could be hard to quantify.
  • With a developer, work out an estimated total level of effort to implement all the needed fixes. With that in hand, you can start wrapping budget numbers and timeline around the rest of this effort. You’ve got your To-Do List, and you have to get it done by November 2021. How do you make that happen? That last question is not something I can answer for you, entirely. But if you have questions or need help, please feel free to reach out. This is what we do, and we love helping our clients figure out how to tackle complex issues based on the time and resources they have.  

SO, WHAT DOES MY TIMELINE LOOK LIKE FOR THIS D8 → D9 UPGRADE? 

If you have no blockers to upgrade, then you should upgrade asap. D9 drops on June 3, and there is no reason to wait if your path is clear. Get that upgrade applied as soon as you reasonably can. If it were me (and depending on the size and resources of my organization), I’d look to have it done before summer ends.

If you do have blockers in your upgrade path, then what we really need to do is analyze the level of effort for remediating those blockers and then put a plan in place that will allow us to upgrade as soon as possible or at the very least before November 2021.

And one final question:

WHY SHOULD I UPGRADE TO D9 NOW INSTEAD OF WAITING UNTIL THE LAST MINUTE?

Well, I have two answers for you.

#1 I am always a proponent of tackling things early when possible. Why put off tomorrow what you can do today? You’ve got time, yes, but don’t back yourself into a corner.
#2 It’s true that this initial release of D9 doesn’t contain much in the way of shiny, sparkly new features (there are some updates from Drupal 8.8, like upgrades to streamline node migration from D6/7, but likely nothing that will WOW a non-technical user), but that doesn’t mean that future D9 releases won’t. This drop is designed to make upgrading as easy and issue-free as possible, and that is part of why major feature updates are not included. But no bones about it, D9 is the path to the future, and all the latest and greatest coming out of the Drupal community will be focused on D9 compatibility over all other versions. Get yourself on that path and be ready for some of the new features slated for development. To learn more about the roadmap for possible future features, check out the Driesnote from Drupalcon Amsterdam 2019: What are the new features of Drupal 9? | Drupal guide on Drupal.org

AT TAOTI WE ARE HERE TO HELP!

We are a full-service creative agency, but our roots are based on website development, primarily Drupal. This is something we take great pride in, and we continue providing cutting-edge knowledge of Drupal development to all of our clients. Need to upgrade your Drupal site, or is your organization thinking of completely redoing the whole website? We are here to guide you through everything, so drop us a line at hello@taoti.com.