Remove requirement for core_version_requirement for module to be compatible with Drupal 9

Created on 27 August 2021, about 3 years ago
Updated 7 May 2024, 6 months ago

Problem/Motivation

When the core_version_requirement line was added to Drupal core it immediately caused thousands of Drupal 8 modules and themes to no longer be compatible with core. While community effort has gone a good way towards making all modules and themes compatible, there are still thousands of them which have not been made compatible yet. Multiple projects ( #3168047 β†’ , #3227031 β†’ ) have looked at automating the process of making D8 projects compatible with D9, but even with that there would still be a sizable effort required by the community to manage the projects. There might be a better way of handling the total volume of work required of the community to make these under/un-maintained projects compatible with Drupal 9.

Related to this we would need a separate change to the Composer facade which would make the default composer.json generated for modules to declare compatibility with both Drupal 8 and 9 instead of just 8, allowing all modules to be added to a Drupal 9 codebase if either a composer.json file is not present that declares a core requirement, or the info.yml file(s) do not declare a core_version_requirement line.

Proposed resolution

Change how the core_version_requirement setting in ".info.yml" files is interpreted:

  • If the core_version_requirement line is not present in a project, assume it is compatible with the current core version.
  • If the core_version_requirement line is present in a project, process it as normal.

Remaining tasks

Reach agreement on the proposed plan.
Build the necessary changes.

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

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.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    To prevent future contrib module upgrade bottle necks going from D9>D10, D10>D11, etc. yet setting some limits, perhaps recommending defining a minimum and maximum version could be considered? That way contrib modules can be easily installed and worked on in the next official major release while it's underway, but not yet released.

    Maybe something like @japerry suggested in Navigating core_version_requirement?

    What should core_version_requirement look like?

    My personal preference is to work with the next β€˜beta’ of a major version. That allows developers to immediately work with a module, but doesn’t allow it to automatically work with the next stable release:
    [...]
    If your module supports Drupal 9 and 10:
    core_version_requirement: >=9.2 <11.0.0-stable

    This is also the proposed solution in πŸ“Œ Add a composer plugin that supports 'composer require-lenient' to support major version transitions Active , though that issue only suggests setting a minimum.

  • πŸ‡³πŸ‡΄Norway gisle Norway

    Updated the issue summary: The core attribute is already deprecated, and has been ignored since Drupal 8.
    Fixed formatting and a typo.

  • πŸ‡³πŸ‡΄Norway gisle Norway

    Fixed more formatting in issue summary.

  • πŸ‡³πŸ‡΄Norway gisle Norway

    If the proposed resolution is let a maintainer remove the core_version_requirement setting in from ".info.yml", and thereby making the project core version agnostic.

    The proposed resolution is equivalent to what the maintainer will get if they use the following unbounded version constraint:

    core_version_requirement: >=8.0

    I.e.: There is not need to change core to have this behaviour.

    Using an unbounded version constraint is one of the possible resolutions under discussion in πŸ“Œ Add a composer plugin that supports 'composer require-lenient' to support major version transitions Active .

    I think this issue should be closed as a duplicate.

  • πŸ‡ΊπŸ‡ΈUnited States cmlara
Production build 0.71.5 2024