Do not allow core: 8.x in info.yml file.

Created on 27 June 2023, almost 2 years ago
Updated 28 June 2023, almost 2 years ago

Problem/Motivation

Adding both core and core_version_requirement with anything other than core_version_requirement: ^8 || ^9 || ^10 will result in an exception. This is not valid because the core: key would include versions that do not recognize the core_version_requirement: key.

Steps to reproduce

For example, a theme that is compatible with Drupal 8 versions after Drupal 8.8.0 and also Drupal 9 will need an info.yml file like this:

name: My Module
type: module
core_version_requirement: ^8 || ^9 || ^10

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Harshita mehra

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

Comments & Activities

  • Issue created by @Harshita mehra
  • Status changed to Needs review almost 2 years ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update almost 2 years ago
    28 pass
  • 🇮🇳India Harshita mehra

    Hello Maintainers,
    I have provided a patch to fix this issue.
    To get more information visit https://www.drupal.org/node/3070687
    Please review it.

    Thanks!

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update almost 2 years ago
    28 pass
  • @harshita-mehna opened merge request.
  • Status changed to Postponed: needs info almost 2 years ago
  • 🇳🇱Netherlands megachriz

    I've manually tested to install XMLRPC on a Drupal 10.1 site and that went without issues. The automated tests also pass on Drupal 10.

    So I think removing the core key is not required and that there's no bug here. In certain situations the core key may not be allowed, such as when core_version_requirement is ^8.8 || ^9.

    Or do you experience installation issues/exceptions? On which Drupal and PHP versions?

  • 🇮🇳India Harshita mehra

    Hi @MegaChriz, My point here is the core key needs to be removed from info.yml files to make the module compatible with D10. If you just want to support D9 and you still want to support D8, which is EOL for a long time now, you can keep the key but then the module can't support D10 in that version.

    Thanks!

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update almost 2 years ago
    28 pass
  • Status changed to Fixed almost 2 years ago
  • 🇳🇱Netherlands megachriz

    @Harshita mehna
    I can install the module on a D10 site without issues, so removing the core key is not required for D10 compatibility. At least in this particular case.

    However, keeping the core key doesn't seem to have additional benefit either because I read on https://www.drupal.org/node/3070687 that Drupal sites < 8.8.2 will have trouble using this project because the test module "xmlrpc_test" doesn't have either a core key or a core_version_requirement key:

    Note that test modules can omit the core_version_requirement key entirely as of Drupal 8.8.2, so that they will work with any core version they are tested against. Prior to 8.8.2, the value is required for test modules and will cause site errors if it is not included.

    So therefore I have merged your changes. :) I just change the category to "Task", because I believe it isn't a bug.

  • 🇮🇳India Harshita mehra

    @MegaChriz,
    Thanks :) for the review and reply.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024