Drupal 9 and semantic versioning

Drupal 9 y el versionamiento semántico

This is the beginning of a series of articles I will be writing about Drupal 9, just a few weeks before this new version is available in stable release for everyone.

Warning: This article is suitable for developers or anyone with a developer's heart.

The versioning issue is not as a great novelty in Drupal 9 because since Drupal 8 we were already experiencing the changes little by little towards the semantic versioning, in fact it is the one that has facilitated the upgrade process as we approach Drupal 9.

The semantic versioning helps us to better read a Drupal version, it uses three numbers to identify the version instead of two, for example, when we go to the download page of the drupal.org project we find a version number like the following:

                               drupal core

This number 8.8.8 is the representation of MAIN.MINOR.PATCH, as the development team updates it will take into account the following criteria to assign a number to each of them as follows:

  • MAJOR Version: When changes are made to the API so large that they remove obsolete functions or create incompatibilities, this version is the one that takes years to change, it has been 5 years since it changed to version 8, as the changes are so large, there is no backward compatibility, that is why Drupal 8 is not compatible with Drupal 7.
  • MINOR version: This version adds new features while maintaining compatibility with previous versions, the API does not change substantially, for example, when you changed from version 8.7 to 8.8 the changes in 8.8 maintain compatibility with 8.7 and also the Pathauto module became part of the core. 
  • PARCH version: Corresponds to a version that fixes identified problems, these can be functional or security issues.

So the image we saw earlier would read like this:

  • 8: Indicates that the software has gone through seven previous versions that have had profound changes to the API and is currently on the eighth.
  • 8: There have been eight changes that add new functionality throughout the existence of major version 8, if for example the major version were to change to 9, the minor version would change to zero, because there would not yet have been changes that add new functionality in this new version.
  • 5: Five sets of functional or visual fixes have occurred over the life of minor version 8.

Additionally, one of the requirements of semantic versioning is to have a Public API which can be consulted so that a development team can determine if they want to implement the changes brought by the new version, the address of the drupal public API is https://api.drupal.org.

Drupal has followed this numbering scheme since version 8.0 was released in 2015 and such it seems that the MAIN version will be updated every two to three years. This has (in a good way) forced a development process that allows for easier functional updates and easier removal of old code. Previously, version releases would not offer future support for old code, leaving developers in a scenario where they must update or provide their own updates to legacy code.

 

Why is it important to understand semantic versioning?

Whether you are part of a development team working with Drupal or any other software that uses semantic versioning or you are part of the management team that makes decisions regarding software upgrades, being clear on what kind of changes you can expect in the software just by looking at the version will allow you to make the right decisions with your team and have a better upgrade plan.

Drupal 9.0.0 being a MAIN version change, you can expect some major API changes that require the attention of your development team to make the necessary adjustments to make it compatible with the new version. The very good news is that the change from Drupal 8 to Drupal 9 has nothing to do with the change that Drupal 7 to Drupal 8 had, in this new update the necessary adjustments are so easy to apply that there are even already a lot of contributed modules compatible with Drupal 9.

If you are planning to upgrade to Drupal 9.0.0 and we suggest you do it, it is time to start the necessary adjustments, in another article we will discuss the details of how to do it, if you prefer to have the support of an expert team, we are here to help you, contact us.

 

Inspired on: 

  • https://zu.com/articles/drupal-9-coming
  • https://drupalize.me/videos/semantic-versioning
  • https://www.drupal.org/core/release-cycle-overview

 

Aldibier_Morales