drupal-composer / info-rewrite

A composer plugin for rewriting Drupal .info/.info.yml files
GNU General Public License v2.0
7 stars 3 forks source link

In Drupal 9: Duplicate key "core|version" detected #39

Open lkmorlan opened 3 years ago

lkmorlan commented 3 years ago

When running this in Drupal 9, I am seeing:

Unable to parse ....info.yml Duplicate key "core" detected at line 13 (near "core: '8.x'").

Unable to parse ....info.yml Duplicate key "version" detected at line 9 (near "version: '8.x-3.4'").

info-rewrite adds a core key, but this is often already present (though it should now be core_version_requirement). Info files often have version: VERSION. info-rewrite will probably need to update version: VERSION instead of appending a second version key with the actual version.

Pasqualle commented 3 years ago

dev modules should not have a "version" key. "core" key is a problem, info-rewrite should not add that any more.

lkmorlan commented 3 years ago

It should probably also not add a version key if one already exists. I know that version should not already exist, but in modules, it's there.