As a followup to #3101941: Add composer.json for compatibility with Drupal 9 automated testing, for Drupal 9 compatibility, this module will also need the core_version_requirement defined.
See https://www.drupal.org/project/project_composer/issues/3084063#comment-1... :
Note: I seem to have a case where the workaround of adding it manually to composer.json doesn't seem to work for testbot
and https://www.drupal.org/node/3070687#comment-13418093
Indicating that the composer.json file is no longer necessary..., and finally, in https://www.drupal.org/project/project_composer/issues/3084063#comment-1...
It will set the drupal/core version to any version requirement set by a dependency on a core module from the .info.yml files, like it does now.
If core_version_requirement is set, that will take precedence over what is in the .info.yml dependencies section.
If drupal/core is listed as a dependency in the composer.json, that value will take utmost precedence.
For the Mini Layouts project, in the near-term, only having the core_version_requirement
in the .info.yml file should be sufficient, since there is no need for a composer.json to specify other constraints.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3114958-bump_core_version_requirement-5.patch | 408 bytes | mark_fullmer |
#2 | 3114958-add_core_version_requirement_remove_composerjson-2.patch | 767 bytes | mark_fullmer |
#2 | 3114958-add_core_version_requirement-2.patch | 370 bytes | mark_fullmer |
Comments
Comment #2
mark_fullmerThe attached patches provide a version that just adds the core_version_requirement to the .info.yml, and one that additionally removes the composer.json (as stated above, it's not technically necessary).
Comment #4
rlmumfordDecided to get rid of composer.json - less to maintain. Thanks for helping me stay up to date on this.
Comment #5
mark_fullmerSorry to re-open this! I only discovered a constraint on the core_version_requirement until after running tests on the Drupal 9.0 branch:
See background at #3077942: If 'core_version_requirement' specifies compatibility with all versions of Drupal 8 like '^8' the 'core: 8.x' must also be set.
So, we need to bump the minimum version. Patch attached that specifies
^8.8
as the minimum Drupal 8 version (^8.7 should work, per semantic versioning, too, if you feel it is valuable to allow sites running 8.7 right now to newly install this module, rlmumford).Comment #7
rlmumfordI've pushed another commit - with ^8.7. I'm a bit concerned that I needed to put ^8.7.7.
Do I need to roll a release?
Comment #8
mark_fullmerA new release is not required for modules that require this module in their testing suites to work -- they will grab the latest 8.x-1.x commit.
Let's see what Layout Builder Restrictions' 9.0 test run does this time around, and if it gives the thumbs up on Mini Layouts' 9.0 compatibility, you could consider cutting a release that represents that the module is (currently) 9.x compatible, and add a badge about it on the project page (see https://www.drupal.org/project/drupalorg/issues/3046058).
Comment #9
Christopher Riley CreditAttribution: Christopher Riley commentedI am using version 10 of drush do I need to apply this patch or not as I am getting:
The 'core_version_requirement' can not be used to specify compatibility for a specific version before 8.7.7 in modules/contrib/mini_layouts/mini_layouts.info.yml
when I do a drush updb
Thanks,
Comment #11
rlmumford@Christopher-Riley I've committed a fix. Can you test now?
Comment #12
Christopher Riley CreditAttribution: Christopher Riley commentedPulled the latest dev and still get:
The 'core_version_requirement' constraint (^8.7.7 || ^9) requires the 'core' key not be set in modules/contrib/mini_layouts/mini_layouts.info.yml
If I remove the line I can do the drush updb and the site loads otherwise no joy.
Comment #13
mark_fullmerThat's progress! Now this module just needs to remove the
core
parameter: https://git.drupalcode.org/project/mini_layouts/blob/8.x-1.x/mini_layout...Comment #14
mark_fullmerSee similar issue & resolution at https://www.drupal.org/project/stage_file_proxy/issues/3085394#comment-1...
Comment #16
rlmumfordTry now?
Comment #17
Christopher Riley CreditAttribution: Christopher Riley commentedI do believe we are in business thanks for looking into this.