Semantic Versioning Strategy Refined for Drupal Commerce Modules
Centarro’s Ryan Szrama revisits the topic of semantic versioning in a detailed blog post focused on how it applies to Drupal Commerce module development. With the transition from legacy versioning conventions like 8.x-2.1
to semantic versioning (3.1.0
,
4.0.0
,
etc.), the Drupal Commerce team has streamlined release workflows to better support modern Drupal practices. Szrama highlights that relying on Drupal version identifiers is now outdated, especially as modules continue to support multiple Drupal core versions beyond 8.
A key change discussed is the simplification of branch management. Previously, each new minor version prompted a new branch (e.g., 3.1.x
,
3.2.x
). Centarro has now moved to major-version branches only (e.g., 3.x
, 4.x
), tagging releases within those branches using semantic versioning. This approach reduces maintenance overhead while still supporting clear upgrade paths. It also allows critical bug fixes to be backported cleanly to older minor versions through targeted patch releases, a critical need in secure production environments.
The update strategy not only improves maintainability but also empowers developers to safely constrain module updates in Composer while receiving essential fixes. Ryan notes this process is being applied across all Centarro-supported modules and encourages other Drupal contributors to adopt similar practices.