If lazy is already enabled on a Drupal instance < v8.8 throws an error for the changed API method.

Comments

osman created an issue. See original summary.

  • osman committed 3c96241 on 8.x-3.x
    Issue #3114371 by osman: The service "lazy" has a dependency on a non-...
agoradesign’s picture

as soon as you depend on 8.8 (or even 8.7.7), you can drop the "core: 8.x" line from info.yml, the core_version_requirement is enough. It makes only sense to keep that line, if a module wants to keep compatibility with older versions

osman’s picture

Status: Active » Fixed

Thanks @agoradesign, for pointing that out.

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.

For others landing on this page and want to learn more on the topic:
https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-...

  • osman committed b55d1e3 on 8.x-3.x
    Issue #3114371 by osman, agoradesign: Remove `core: 8.x`
    
    @see https://...

Status: Fixed » Closed (fixed)

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