Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

3 Ways to Prepare Your Site and Team For Drupal 9

Parent Feed: 

Drupal 8 to Drupal 8

Drupal 9’s release is just around the corner. If you are on Drupal 8, then you are well on your way to Drupal 9 readiness. The planned release date for Drupal 9 is June 2020 with Drupal 8 and Drupal 7 reaching end of life in November 2021. Drupal 8’s new release cycle allows a straightforward upgrade path but developers no longer get the benefit of rearchitecting for the new version. Thinking about architectural decisions, technical debt, and clean site building now will help your Drupal 9 transition and success.

Upgrade to minor releases

The simplest way to prepare for Drupal 9 is by staying up to date on Drupal’s minor release cycle. New features roll out every 6-months and each release adds new functionality plus can deprecate contrib modules (workbench moderation in favor of content moderation, media in favor of core media, panels in favor of layout builder, etc). Drupal 8.7 came out on May 1 while Drupal 8.8 is planned for December 4.

With each minor release, the following should be considered in your deployment process:

Consider soon-to-be-deprecated code

Run `drupal-check` to validate what deprecated code exists in your repository or use the GUI based Upgrade Status module. Create tasks in your backlog to remove these over the following 6-months. Check custom code but also key contrib modules utilized. If deprecations are found in contrib, create an issue then patch the deprecation.

Look ahead to Drupal 9 core

Review the release notes and see what core features can take the place of something you’re using contrib or custom to achieve. Evaluate updating to the core solution. Removing custom code or contrib in favor of core ensures long term support and automated testing. Example: Are you still running contrib media? Work to upgrade this to core media.

Talk to your editors and site builders

Ask them, “What is the one thing we could do or stop doing to make your day to day better?” Work to include this feedback over your next few sprints. Yes, this won’t make your Drupal 9 upgrade easier, but it will ensure team support for Drupal across your organization. Preparing for Drupal 9 includes keeping connected to the overall team’s needs.

Audit Site Building

Drupal’s power lies in how easy it is to add fields, make customizations, and tag on new features — without ever touching code.   

Drupal’s pain lies in how easy it is to add fields, make customizations, and tag on new features — without ever touching code.

Since the core codebase and configuration will not change in Drupal 9, these customizations can add bloat, cause regression risks, and slow performance. 

Regularly check in on your content types, site configuration, and fields to see what can be deprecated, removed, or done in a more reusable way. Things to look for include:

  • Fields added for a one-time event that now sit dormant

    • Think about removing this field completely or utilize an existing block, field, or paragraph to achieve the results.
  • Content types with little to no content added

    • Is this content type still needed? Could you instead create a more generalized content type utilizing paragraphs or layout builder to allow more customization of one-off page creation requests?
  • Out-of-date help text

    • Help text is often forgotten about by power uses. But what happens when a new teammate joins the organization? What about when someone takes a vacation? Ensuring up-to-date help text, consistent field titles, and reasonably organized fields on content types are all ways to support an intuitive admin interface

Automation

In past versions of Drupal, a new major release meant any work to automating processes would grind to a halt as these would need to be recreated for the next major version. Since Drupal 9 will no longer require tearing down and rebuilding your project, any improvement made to automation will give you more time to focus on features, your editors, and your organization’s mission. No stakeholder wants to hear they can’t have a new feature because of the latest security release or a botched release. Give your team confidence to releases and features by automating testing today.

Two aspects of automation should specifically be focused on:

Releases

Every part of a release that can be automated should be. This allows for releases to happen more often with less risk.

  • Aim to create a release process that is not dependent on a single person
    • When a security risk opens up and your release engineer is on vacation, can someone quickly and reliably execute the release?
  • Take one step at a time.
    • Automate one step at a time and improve over time. Don’t try to make everything happen at once.
  • Look at what continuous integration your hosts uses.
    • Leverage something you already have existing through your host or Git provider versus building from scratch.

Testing

Every developer loves squashing technical debt. Every product owner cringes when those two words are mentioned. Technical debt never ends and can take hundreds of hours away from feature development. Though automated testing can’t change that, it can help to prevent rework and regressions as code or features are updated. Similar to automating releases, automating testing provides more confidence in your site’s stability and performance with each test added. 

There are a variety of testing infrastructures to look at but Drupal Core provides PHPUnit tests out of the box and a testing infrastructure for them. Behat integrates well for quick smoke tests after releases to ensure that core pages or links work as expected.

  • Start small.
    • Try to make a simple hello world test and expand to an easy, and somewhat trivial check after a release.
  • Scale up smoke tests.
    • Add in new tests over time for items you check in a smoke test manually after each release. Soon you’ll have your smoke testing fully automated and can start implementing regression tests and testing in all future code.

Plan Strategically for Drupal 9 

Upgrading to Drupal 9 will be an easier process than ever before but will not equal a clean slate to start from. Decisions made today will affect your site for years to come. Throughout your day-to-day, think of the following:

  • Stay up to date on Drupal Minor Upgrades (8.7, 8.8, etc.).
  • Audit your site building to ensure it applies globally, remove one-off fields and deprecated features.
  • Automate your releases and smoke/regression testing.

If you have questions about how to build a strategy for a successful transition to Drupal 9, we’re here to help. Drop us a line.

RSS Tags: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web