Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295724

Display core compatibility ranges for available module updates

$
0
0

Problem/Motivation

Now that #2807145: [policy, no patch] Allow contrib projects to specify multiple major core branches has been done core_version_requirment can be used to declare core compatibility via Composer semver constraint. It is technically already possible to declare that your module is already compatible with Drupal 9 only. For instance if a module requires one of the newly updated composer dependencies in Drupal 9.

This means that currently the update module could be listing contrib modules that are only compatible with Drupal 9. Previously this would not have been possible.

Once #3009338: [META] Support semantic versioning for extensions (modules, themes, etc) in Drupal core is completed there will no correlation between the module version number and core compatiblity.

Therefore we should display the core compatibility of updates to display this information to the user.

In #3076183: Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core we determined we want

  1. Should a message on all update that display their core compatibility based of the core_version_requirement in info.yml files. This information is now in the update XML from drupal.org as core_compatibility

    The message should be in this format:

    This module is compatible with Drupal core: 8.8.3 to 8.9.1

  2. As 2nd step will switch to a update XML feed that is not tied to CORE_COMPATIBILITY but rather all 8.x and future module updates.
    This will be handled in #3074993: Use "current" in update URLs instead of CORE_COMPATIBILITY to retrieve all future updates

Original all this handled in #3074993 because only the /current feed had core_compatibility
but now this available in the current XML we can handle this first in it's own issue.

Proposed resolution

copied from #3076183: Determine how available updates for modules should be handled if they are not compatible with the current version of Drupal core

  1. Done: in #3074998: Add explicit information about core compatibility to update data add a new core_compatiblity value for each update. This is will be based on core_version_requirement or if not available it will be based core: 8.x

    This is will be for the project not individual modules in the project. Details to be determine in that issue

  2. Display a message for each available project update that displays the core compatiblity range based on 1) actual available updates the update module has retrieved from the update server and 2) the core_compatiblity for the project update xml(see above)
  3. For most common possibilities for core_compatiblity this will be able to displayed as a simple range.

    For example
    Installed core: 8.8.3
    latest 8.x patch release: 8.9.1
    Drupal 9 not released yet
    project xml core_compatiblity: ^8 || ^9

    This module is compatible with Drupal core: 8.8.3 to 8.9.1

    If Drupal 9.0.3 had been released this would change to

    This module is compatible with Drupal core: 8.8.3 to 9.0.3

    if project xml wascore_compatiblity: ^: ^8.8.9 || ^9 (not using core_version_requirement because the value will be directly from the project xml not the info.yml files)
    This module is compatible with Drupal core: 8.8.9 to 9.0.3

  4. Some less common values for core_compatiblity will not be able to display by a simple range. In that case we should display them in a series of ranges.

    For example
    Given:
    Installed core: 8.8.3
    latest 8.8.x: 8.8.7
    latest 8.x patch release: 8.9.1
    Drupal 9 not released yet

    core_compatiblity: ~8.8.0 || ^9

    This module is compatible with Drupal core: 8.8.3 to 8.8.7

    Because 9 hasn't been released it won't come into play.

    If Drupal 9.0.3 had been released

    This module is compatible with Drupal core: 8.8.3 to 8.8.7 and 9.0.0 to 9.03

  5. In this first step no modules will be filtered out of the list.

    This will mean hypothetically you could get projects updates with the message like

    This module is compatible with Drupal core: 9.0.0 to 9.0.5

    In the near term this is very unlikely because 1) Drupal 9 is not out so no module should be compatible with it but not Drupal 8 and 2) 9.0.0 should be compatible with 8.9.0 for modules not using deprecated code. Therefore any module that is compatible with 9.0.0 because it remove deprecations should also be compatible with 8.9.0. So the project would likely have this in the project xml
    core_compatiblity: ^8.9 || ^9 or core_compatiblity: ^8.8 || ^9

Remaining tasks

Finish patch, review

User interface changes

New messages on available updates list

API changes

none

Data model changes

None

Release notes snippet

TBD


Viewing all articles
Browse latest Browse all 295724

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>