Correct core_version_requirement

Created on 30 August 2023, 10 months ago
Updated 24 September 2023, 9 months ago

Problem/Motivation

In acl.info.yml the following line:

core_version_requirement: ^8 || ^9

will make users believe that the project is compatible with all of Drupal 8.

However, in fact, it is not compatible with most versions of core prior to version 8.8 (it unclear when this transition actually happened, but it can be proven that it is not compatible with version 8.7.0).

If one runs a legacy version of core (say version 8.7.0), downloads ACL version 8.x-1.0, and visits the "Extend" page, the site produces a WSOD with the following error:

Drupal\Core\Extension\InfoParserException: Missing required keys (core) in modules/acl/acl.info.yml in /var/www/example.org/html/core/lib/Drupal/Core/Extension/InfoParserDynamic.php:29
   [error]

Steps to reproduce

  1. Install Drupal 8.7.0 โ†’ .
  2. Download ACL version 8.x-1.0 or 8.x-1.x-dev, and place it in the"modules" directory.
  3. Navigate to the Manage ยป Extend page.
  4. Observe the resulting WSOD.

Proposed resolution

In acl.info.yml, replace

core_version_requirement: ^8 || ^9

with

core_version_requirement: ^8.8 || ^9

(You'll still get a WSOD, if you try to install it on a site running core version 8.7.0, but now it is at least documented that this version is not compatible with versions of core prior to version 8.8.)

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

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

Comments & Activities

  • Issue created by @gisle
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 10 months ago
    5 pass
  • @gisle opened merge request.
  • Status changed to Needs review 10 months ago
  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    Please review MR.

  • Status changed to RTBC 10 months ago
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil elber Brazil

    Hi that is correct module is working good.

    Change makes sense and following drupal phpcs

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland salvis

    Actually, I'm not sure about version compatibility. I think it should work for all D8 versions, but testing is available only for 8.9, and we don't get any feedback from users.

    The word "only" in the OP is not mine, and as long as we don't have evidence to the contrary, I'd leave it at ^8.

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    Drupal 8.0-8.7 does not understand the core_version_requirement key, so it simply will refuse to install if you try to install it any version prior to Drupal 8.8.

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    The reason you don't get any feedback from users about this is probably because almost nobody uses versions of Drupal 8 prior to version 8.9 anymore. Those versions have a lot of highly critical vulnerabilities and if you use them, you are putting your at risk.

    I am pretty sure that the the latest version of this project cannot be installed on versions 8.0 - 8.7 because they don't know about the core_version_requirement key.

    However, I've so far been unable to install Drupal core version 8.7.14 to produce the requested evidence for this (see this forum post โ†’ for reference).

    If you want to claim fictitious compatibility in the project's acl.info.yml โ€“ well, I guess that very few people is impacted by it, so I won't use much more energy on it.

  • Status changed to Closed: won't fix 10 months ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland salvis

    almost nobody uses versions of Drupal 8 prior to version 8.9 anymore.

    As of August 27, 2023, https://www.drupal.org/project/usage/drupal โ†’ shows about 40'000 sites using 8.x (x < 9) and 53'000 sites using 10.x.

    I feel fine about not artificially blocking those 40'000 sites.

    I am pretty sure that the the latest stable version of this project cannot be installed on core versions 8.0 - 8.7 because these versions of core don't know about the core_version_requirement key.

    Choking on an unexpected key would not be very elegant...

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    Core prior to version 8.8 will not be choking on an unexpected key. It will choke on being unable to see that the module is compatible with version 8 of core

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 10 months ago
    5 pass
  • Status changed to Active 10 months ago
  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    Well, it still chokes โ˜น๏ธ.

    I've now finally managed to set up a Drupal test site that runs core version 8.7.0.

    Downloading ACL version 8.x-1.0 and placing it inside the code base results in a WSOD if the administer tries to visit the "Extend" page, even without installing it (and of course, because this crashes the site), there is no way of installing it. I've updated the issue summary with these findings.

    The reason none of the users potentially affected by this has filed a bug report against 8.x-1.x-dev is probably because anyone still running an insecure and unsupported Drupal version 8.x-7.x (or older), don't upgrade anything until something breaks. They will of course not be blocked until they try to upgrade to ACL version 8.x-1.0 โ€“ without first upgrading core to at least version 8.8.0.

    You may feel fine about leaving this core version requirement set to a too optimistic value (and for your users to figure out for themselves why this module breaks their site), but as I said initially: It is better to document the real requirements for installing a specific version of the module.

    Setting it back to"Active".

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway
  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway
  • Status changed to Postponed: needs info 9 months ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland salvis

    Ok, thank you for the investigation, @gisle.

    Can we fix it rather than blocking it?

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 9 months ago
    6 fail
  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    Yes, it can be fixed. I've updated MR !6 to fix it.

    Please see this change record โ†’ for background. It says:

    core: 8.x can still be used for modules that need to specify core compatibility with version before Drupal 8.7.7.

    Personally, I don't think it is a good idea to encourage the contined use of versions of core that no longer have security support. But this is your project, so you set its policies.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update 9 months ago
    6 fail
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 9 months ago
    5 pass
    • salvis โ†’ committed c244bf50 on 8.x-1.x
      Issue #3384299 by gisle, salvis: Restore compatibility with D8.x (x...
  • Status changed to Fixed 9 months ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland salvis

    Great, thank you, @gisle!

    Personally, I don't think it is a good idea to encourage the contined use of versions of core that no longer have security support. But this is your project, so you set its policies.

    I'm not encouraging people to stay behind, but I don't want to force them to upgrade either. There can be many reasons for not being able to or not wanting to update/upgrade.

    And I'm really sorry if I caused pain with WSODs.

  • ๐Ÿ‡ณ๐Ÿ‡ดNorway gisle Norway

    And I'm really sorry if I caused pain with WSODs.

    You probably didn't, except me โ€“ and I expected that to happen (so no pain).

    I don't think anyone that is still running Drupal version 8.x-7.x (or older) would have upgraded this module to version 8.x-1.0, and they probably will not upgrade it to 8.x-1.1 either. But it is nice that it is now technically correct.

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

Production build 0.69.0 2024