.

What's New in Drupal 9.4? Review of the Latest Version

The new, major Drupal update was released on 15 June 2022. There are some new elements and changes, such as the Manage permissions tab, dynamic determination of the minimum PHP version, changes in the API, change of the default frontend theme from Bartik to Olivero, and the administrative theme from Seven to Claro. Quite a few functions and libraries have been labeled "deprecated". We'll talk more about these and other changes later in this article.

Is it worth upgrading Drupal to 9.4?

Yes. With the release of update 9.4, security support for 9.2.x will cease. That's why we recommend updating as soon as possible, at least to version 9.3.x and preferably to the recently released version 9.4. Of course, version 9.4 also introduces new improvements and functionalities that are worth checking out.

What to check before updating Drupal to 9.4?

The most important thing will be to check that the currently used PHP version meets at least the minimum requirements. Drupal 9.4 requires PHP version 7.4 at the very least, but the recommended version is 8.1. From now on, the minimum version will be defined using the \Drupal\Core\PhpRequirements::minimumSupportedPhp() method, which is based on the release cycle of both PHP and Drupal versions.

Another element worth checking out is the main .htaccess file, which – since version 9.4 – has a new section containing the settings for PHP 8^. If your application used PHP 7^ before, and you have changes to htaccess, and you want to upgrade to PHP 8^, these custom settings should be moved to the new section.

Since version 9.4, Drupal will show a warning if the currently used database connection doesn't support the JSON format. A connection supporting JSON will be required for Drupal 10.

The most important changes introduced in Drupal 9.4

The latest version introduced a lot of changes and new functionalities. Let's take a closer look at the most important ones.

Manage permissions tab

When editing the content types, we see standard tabs for editing, field management, and form and content display. This is where the permission management options have been added. In this tab, we can easily see the full list of defined permissions, relating only to the type of content that we're currently editing.

The Manage permissions tab is one of the new functionalities introduced in Drupal 9.4 release

 

In order for the tab to be visible in your entity, two keys should be added to its annotation:

  • handlers.route_provider.permission,
  • links.entity-permissions-form.
Adding keys to the annotation of Manage permissions tab in Drupal 9.4

 

The form can also be defined by custom routing. You can find out more about this in the functionality task.

Default Olivero theme in Drupal 9.4

The change applies to the installation using the standard Drupal installation profile. Since the latest release, after the installation, we'll see a new graphic design, differing from the older Bartik theme, primarily due to an updated and modern design and full support for the latest Drupal functionalities, such as multi-level navigation, embedded media or Layout Builder. In addition, the Olivero theme complies with WCAG AA, i.e., the guidelines related to the accessibility of web content. It's also a major step towards modernizing Drupal's look.

The new frontend theme Olivero is one of the novelties in Drupal 9.4 release

Source: Drupal.org

Default Claro theme in Drupal 9.4

The change applies to the installation using the standard profile and Umami. Claro is a clear, accessible, and comprehensive administrative theme, and it's part of the Admin UI & JavaScript Modernisation initiative. When compared to the frontend theme Bartik, it stands out due to its cleanliness and a feeling of freshness, as well as the solutions that have a positive impact on the user experience.

A view of a new administrative theme Claro in Drupal 9.4

Source: Drupal.org

Changes in coding standards in Drupal 9.4

For a long time, the Drupal core has been using ESLint to validate JavaScript. The tool itself remains the same, but Core now uses the eslint-config-airbnb-base configuration instead of eslint-config-airbnb. Anyone using ESLint for the React or JSX code should add eslint-config-airbnb back to their dependencies, as the base version used now doesn’t contain rules for libraries (which we describe below).

Coder has received update 8.3.15, which updates the coding standards. Drupal 9.4 is fully compatible with the latest version of Coder. See the release notes for the complete list of changes in version 8.3.15.

What has been marked as deprecated in Drupal 9.4?

The Color module has been marked, and it'll be completely removed in Drupal 10. If you still need to use it, you can use the contrib module. The same goes for the Hypermedia Application Language (HAL) module. If you need the module, you have to install the contrib version. The Quick Edit module is marked as deprecated since version 9.4 and is planned for removal in Drupal 10. There's a contrib version that should be used instead. A contrib is also available now for the Forum module. For more information on the modules marked as deprecated, see the Deprecated and obsolete modules and themes page.

Apart from the modules, the list of deprecated features has also grown. You can find it on the Drupal.org website.

How to deal with deprecated functions?

The Upgrade Status contrib module will be perfect for this. It lists all the deprecated functions used in contrib and custom modules and themes. Additionally, you can rely on an IDE, which can be equipped with a feature allowing you to list the deprecated functions.

What libraries have been deprecated since Drupal 9.4?

Modernizr.touchevents. This library was used to detect whether the currently used device supports the touchevents, in order to adjust the behavior of the website on this basis. The library is replacing Modernizr.touchevents, i.e., core/drupal.touchevents, uses the same logic, and is backward-compatible. If you used the functions provided by the Modernizr.touchevents library in a custom code, you should get rid of this dependency.

Backbone and Underscore. The first of these libraries was used to create interactive user interfaces, and the second one provided a series of functions, the so-called "helpers", to help write code faster. Drupal Core, and more specifically the drupal.editor.admin and drupal.filter.filter_html.admin libraries, no longer use them. These libraries will be removed in Drupal 10. The modules and themes using these libraries should be rewritten.

Drupal 9.4 release - summary

Drupal seems to be doing better than ever. Systematizing and planning the roadmap well, changing the way of thinking to fewer but sooner, granular changes, one thing at a time, brings results in the form of periodic improvements to Drupal. There's nothing left but to prepare for the update and wait for the next ones. If you need help with the update, our Drupal support team will be happy to advise you or carry out the entire process: from checking for compliance, through upgrading and testing, to implementation.