Currently, the Drupal core Views module is set to be a dependency using an old method.
Also, the core is set to support only Drupal 8.

Apply new {project}:{module} format for dependencies and support Drupal 9 in info.yml

https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-...

Comments

elaman created an issue. See original summary.

elaman’s picture

StatusFileSize
new437 bytes

Here is the patch with the fix.

elaman’s picture

Status: Needs work » Needs review
mmjvb’s picture

Status: Needs review » Needs work

It is removing support for older versions of D8. The core key should remain or document support for ^8.7.7.

ankithashetty’s picture

Status: Needs work » Needs review
StatusFileSize
new406 bytes

Updated the patch with the suggestions recommended by @mmjvb in #4... Kindly review.

Thanks!

elaman’s picture

@mmjvb quote from Specifying the core_version_requirement when needed

The core: key must not be used here to make sure that versions of Drupal before 8.7.7 will not install the module. Adding both core and core_version_requirement with anything other than core_version_requirement: ^8 || ^9 will result in an exception.

Current version of the Drupal 8 core is way past 8.7.7. So you must remove core from info file. Un-updated Drupal website shouldn't be accounted for.

Patch #5 will throw exceptions.

mmjvb’s picture

That quote is about ^8.8 || ^9, not ^8 || ^9 !!!

Patch #5 looks good to me, should not throw exceptions. The quote actually says when having both it MUST be ^8||^9 as in patch #5.

Agree that both the implementation and documentation on core_version_requirement is confusing.

The removal of the core key is not related to the current version of Drupal core (9.0.6). You should remove that key when no longer supporting installation of the module on core before 8.7.7. Removing it forces the upgrade to at least core 8.7.7 or even higher depending on core_version_requirement.

When removing the core key, using ^8||^9 no longer makes sense! Suggest to use ^8.7.7 || ^9 instead.

Consider removing core key scope creep of this issue. This issue should mention the removal of support for core before 8.7.7 if that is what is intended. Also this change doesn't add support for D9, it allows installation and use on D9. Support for D9 would be ensuring no D8 deprecated code is used.

gaurav.kapoor’s picture

Status: Needs review » Closed (duplicate)

This has been fixed in recent commits.

mmjvb’s picture

Status: Closed (duplicate) » Needs work
The website encountered an unexpected error. Please try again later.

Drupal\Core\Extension\InfoParserException: The 'core_version_requirement' constraint (^8.8 || ^9) requires the 'core' key not be set in modules/contrib/views_selective_filters/views_selective_filters.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 88 of core/lib/Drupal/Core/Extension/InfoParserDynamic.php).
Drupal\Core\Extension\InfoParser->parse('modules/contrib/views_selective_filters/views_selective_filters.info.yml') (Line: 554)
Drupal\Core\Extension\ExtensionList->createExtensionInfo(Object) (Line: 316)
Drupal\Core\Extension\ExtensionList->doList() (Line: 155)
Drupal\Core\Extension\ModuleExtensionList->doList() (Line: 282)
Drupal\Core\Extension\ExtensionList->getList() (Line: 143)
Drupal\update\UpdateManager->getProjects() (Line: 284)
update_get_available() (Line: 38)
update_requirements('runtime') (Line: 96)
update_page_top(Array) (Line: 351)
Drupal\Core\Render\MainContent\HtmlRenderer->buildPageTopAndBottom(Array) (Line: 150)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

gaurav.kapoor’s picture

Good catch @mmjvb. I didn't release the 'core' key was still set in the info.yml file. I have removed it in another commit.

gaurav.kapoor’s picture

Status: Needs work » Fixed

The info.yml looks good to me now.

Status: Fixed » Closed (fixed)

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