[META] Support semantic versioning for extensions (modules, themes, etc) in Drupal core, and allow modules to be compatible with Drupal 8 and 9 at the same time

Created on 25 October 2018, about 6 years ago
Updated 6 November 2024, 16 days ago

Problem/Motivation

At #1612910: [policy, no patch] Switch to Semantic Versioning for Drupal contrib extensions (modules, themes, etc) we finally decided to allow Drupal contrib extensions to use pure Semantic Versioning (SemVer). At over 400 comments, that issue is no longer useful to get anything done. ;)

This issue is the meta plan for tracking progress implementing the fixes to allow both semver and legacy versions within Drupal core. Drupal.org and packaging issues are tracked here: #2681459: Support contrib semver releases

Proposed resolution

Documentation Updates

Everywhere we've documented "PatchLevel" we need to relabel as "Minor", for example What do version numbers mean on contributed modules and themes? . PatchLevel and Minor are semantically equivalent, so we should eliminate confusion by having two semantically different things named "Patch" and "PatchLevel". There are a ton of other related docs that need to be updated to discuss this plan, explain / link to SemVer, etc.

Drupal 7

Drupal 7 contributed modules will continue to follow the existing pattern. 7.x-MAJOR.MINOR. For those user using composer to manage a drupal 7 site, the composer facade is able to translate this into a fake semver that composer can understand. For the users downloading files manually, or with tools like drush, they will still know that they are getting the drupal 7 version as it will be clearly marked.

Drupal.org

Drupal 8 contributed modules will allow for releases in the pattern of MAJOR.MINOR.PATCH. The composer facade and drupal.org will understand and allow for repository tags that include 8.x-MAJOR.MINOR (legacy), or MAJOR.MINOR.PATCH (fully compliant). Drupal core will need to be modified to expect and interpret these possibilities as well.

We have to fix Drupal.org to allow legacy (8.x-MAJOR.MINOR) and semver (MAJOR.MINOR.PATCH) versions on projects going forward. We'll probably have to retain the legacy support for a while, perhaps indefinitely.

see more #2681459: Support contrib semver releases

5) Drupal 9 (maybe) we can deprecate the (9.x) part of the versioning scheme, as it may not even be accurate, and from that point forward, MAJOR.MINOR.PATCH will be the version numbers for drupal contrib projects, and dependency compatibility *must* be specified in the info.yml files (or composer.json if that's where we end up).

Remaining tasks

Core

Core needs to support semver dependencies, and the core Update module needs to support semantic version releases and development branches.

Must-have

Should-have

Could-have

Needs triage

  1. 📌 A pre-release update will be recommended for semantic version updates if the patch number is equal to the patch number from the previous release Needs work
  2. #3105463: Create tests for recommended bugfix releases
  3. #3076183: [Meta] Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core
  4. 📌 Remove Drupal::CORE_COMPATIBILITY because it is not accurate when modules can be compatible with multiple core branches Active
  5. #3113992: The 'Update' page has no idea that some updates are incompatible
  6. 📌 Decide what to do with Drupal::CORE_MINIMUM_SCHEMA_VERSION and surrounding logic Active

Drupal.org

See #2681459: Support contrib semver releases .

Documentation

As this moves forward, we'll need to update a lot of documentation.
(This list needs to be fleshed out):

User interface changes

TBD

API changes

TBD

Data model changes

TBD

🌱 Plan
Status

Active

Version

11.0 🔥

Component

extension system

Created by

🇺🇸United States dww

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024