Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I try to clear the cache then this error appears:
The 'core_version_requirement' constraint (^8.7.7 || ^9) requires the 'core' key not be
set in modules/contrib/stage_file_proxy/stage_file_proxy.info.yml
To get rid of that error and ensure the module cannot be installed on outdated versions of core (where the Deprecation related changes will cause issues) we should get ride of the "core:" value from the info file.
Comment | File | Size | Author |
---|---|---|---|
#9 | 3085394-no-core-prevent-old-drupal-installing.patch | 522 bytes | greggles |
Comments
Comment #2
saschaeggiComment #3
gregglesAre you using 8.x-1.0-rc1 or 8.x-1.x-dev?
We just added core_version_requirement to 8.x-1.x-dev but it's not in 8.x-1.0-rc1. This issue is tagged to 8.x-1.0-rc1.
Are you clearing cache via the admin UI or via something like `drush cr`?
Comment #4
gregglesI just tried this on simplytest.me with 8.7.8 core and was unable to observe this issue with either 8.x-1.0-rc1 or 8.x-1.x-dev.
Comment #5
saschaeggiSorry my fault it was on dev, not rc1 :-)
Comment #6
saschaeggiTo reproduce it: try it with drush (9)
Comment #7
geek-merlinStrange. From the InfoParserDynamic code:
Comment #8
saschaeggiIf i try to use either
drush cr
ordrush updb
I getIf I remove the following line from the yml
core_version_requirement: ^8.7.7 || ^9
than it works again.
Hope this helps.
Comment #9
gregglesI had to read https://www.drupal.org/node/3070687 a few times to really get this idea. Check the example that starts with "For example a module that is compatible with Drupal 8 versions after Drupal 8.8.0 and also Drupal 9 will need a info.yml file like this:"
We should remove `core:` because then the module will not install on versions of core prior to 8.7.7. That seems like a good thing.
Comment #11
saschaeggiPatch from #9 works like a charm for me
Comment #13
gregglesCool - thanks for the quick review :)
I guess #3085280: Add a (at least empty) test is kind of important. Even just visiting the admin/modules page might have caught this.
Comment #14
gregglesSomehow the credit didn't stick.