Adding both core and core_version_requirement with anything other than core_version_requirement: ^8 || ^9 will result in an exception.

For example, a module/theme that is compatible with Drupal 8 versions after Drupal 8.8.0 and also Drupal 9 will need to use the following line in its .info.yml file, without a line containing core.

core_version_requirement: ^8.8 || ^9

In the rare occasions the module/theme is also compatible with Drupal 10, its .info.yml file should use the following line.

core_version_requirement: ^8.8 || ^9 || ^10
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Harshita mehna created an issue. See original summary.

harshita mehna’s picture

Status: Active » Needs review

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

Thanks!

priya_degwekar’s picture

Hi @Harshita mehna, I have reviewed and tested #MR4.
It is removing the core key cleanly.

priya_degwekar’s picture

StatusFileSize
new8.05 KB
new31.54 KB

Attaching screenshots for reference.
Can be move to RTBC.

priya_degwekar’s picture

Status: Needs review » Reviewed & tested by the community
avpaderno’s picture

Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs work

harshita mehna’s picture

Status: Needs work » Needs review
StatusFileSize
new790 bytes

@apaderno,

So What I understood here is that the core_version_requirement key is compatible with Drupal 8.8 and its above versions.
But If we want to get compatibility with all three versions 8,9 and 10 then we need to add
core: 8.x with core_version_requirement: ^8.8 || ^9 || ^10
Can you please let me know that Am I correct here or not?
Please share your thoughts and review again.
Apart from these thanks for showing me the correct way.

Thanks.

avpaderno’s picture

Title: Do not allow core: 8.x in info.yml file. » Remove "core: 8.x" from the .info.yml file
Issue summary: View changes

See the update issue summary.

avpaderno’s picture

Status: Needs review » Needs work

The .info.yml file contains the following lines.

core: 8.x
core_version_requirement: ^8 || ^9 || ^10
configure: userprotect.rule_list
dependencies:
  - drupal:system (>=8.7.0)
  - drupal:user

The line containing core: 8.x and the line containing drupal:system (>=8.7.0) must be removed. The line containing core_version_requirement: ^8 || ^9 || ^10 must be changed to core_version_requirement: ^8.8 || ^9 || ^10.

chaitanyadessai’s picture

Status: Needs work » Needs review
StatusFileSize
new485 bytes

Please review patch.

avpaderno’s picture

The last patch is correct. 👍

harshita mehna’s picture

Please review the commit e93dd434 and thanks for showing me the correct way.

avpaderno’s picture

Status: Needs review » Reviewed & tested by the community
solideogloria’s picture

Status: Reviewed & tested by the community » Needs work

Needs Work to resolve this MR note, or it should be made clear that the patch should be merged instead of the MR.

  • MegaChriz committed 938f3b28 on 8.x-1.x
    Issue #3374985 by Harshita mehna, chaitanyadessai, Priya_Degwekar,...
megachriz’s picture

Status: Needs work » Fixed

Alright, I committed the patch from #13.

Status: Fixed » Closed (fixed)

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