Drupal finally support Semantic versioning

Profile picture for user a.berramou
Azz-eddine BERRAMOU 13 April, 2020

Yes it's true no more pain how to name you Drupal projects branches (i mean like 8.x-1.x) or your tags like 8.x-1.0, Semantic versioning is now available for all contributed projects on http://drupal.org.

before we started talking about what changed, let's see what Semantic versioning mean and what it was the naming conventions Drupal used before.
 

What is semantic versioning ?

According to https://semver.org

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards compatible manner, and
  3. PATCH version when you make backwards compatible bug fixes.

So the semantic versioning is to give your software a version number with three parts MAJOR, MINOR and PATCH.

  • MAJOR : major changes 
  • MINOR : new functionality / feature 
  • PATCH : bug fixes 

If Drupal wasn't using Semantic Versioning!


What was it's naming conventions then ?

Drupal was using their own naming convention like {API_COMPATIBILITY}-{MAJOR}.{MINOR/PATCH} like the following:

Image
Drupal version model

 

 

  • API COMPATIBILITY : Drupal Core compatibility like 7.x for Drupal 7 and 8.x for Drupal 8.
  • MAJOR :  New functionality / feature 
  • MINOR/PATCH :  The last part for both patches or bug fixes

Now project versions will be like 3.1.0 instead of 8.x-3.100 and it can be both Drupal 8 and 9 compatible.
Besides for Drupal 8 compatibility only for 8.8.3 version and newer.

For more example take a look here.

The Twig Tweak module already release a with new versioning.

Image
new versioning screenshoot

For further reading: