Problem/Motivation

When trying to install this module on Drupal 8.7.7 or later, the following error is shown:

Drupal\Core\Extension\InfoParserException: The 'core_version_requirement' constraint (^8.7.7 || ^9) requires the 'core' key not be set in modules/components/components.info.yml

Proposed resolution

I removed the core definition from the module and tested it with core 8.7.7+.

Please review.

Comments

kadiiski created an issue. See original summary.

kadiiski’s picture

mmjvb’s picture

Obviously, the core key is for installations before D8.7.7. When you don't want your module to be installed/updated on those environments you should remove the key. When you allow it on those environments you need the core key. Don't know what causes this error, if it is core, you might try ^8 instead of the more logical ^8.7.7.

It appears they consider this error to be correct and are not prepared to change that. So, either change the version constraint or change the code, preferably by patch so you can repeat it.

istryker’s picture

Priority: Normal » Major

Nah this is a major bug, you cannot install a new site.

kadiiski’s picture

I prefer having it as a patch and also keep up with the latest versions of the module so it's still nice to have it if you need it.

berdir’s picture

Status: Needs review » Needs work
Issue tags: +Drupal 9 compatibility, +Novice

As the comment says, the dependencies key below can/should be removed too.

berdir’s picture

Also, a drupal/core requirement should be added to composer.json as drupal.org doesn't do that yet automatically.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new838 bytes

This is also removes the no longer required dependency and adds it to composer.json, which is currently required to fetch it with composer as d.o doesn't respect the new key yet when generating that.

johnalbin’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

I vaguely remember that Drupal core 8.7.7 was complaining when I had the following lines in the .info file:

core_version_requirement: ^8.7 || ^9
core: 8.x

I'm pretty sure it was complaining that I couldn't specify "^8.7" because 8.7.0 doesn't understand the core_version_requirement. Which is why I changed it to "^8.7.7" even though the module is compatible with 8.7.0 and later.

Anyway, the patch looks good to me.

  • JohnAlbin committed 9fd286f on 8.x-2.x authored by Berdir
    Issue #3100006 by kadiiski, Berdir, mmjvb, iStryker: [error] on install...
johnalbin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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