Default service autowire autoconfigure

Created on 26 February 2025, about 2 months ago

Problem/Motivation

When he module is installed, the following error occured:

The definition for "_defaults" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.

Steps to reproduce

Install the module on a Drupal 9 instance (our was 9.4.5)

Proposed resolution

The module uses default service parameters, which, if I'm not mistaken, are not available before 9.5.0.
And in these default parameters, there is the autoconfigure parameter which should allow EventSubscriber classes to be recognized as such simply by implementing the EventSubscriberInterface.

Again if I'm correct, this feature is available from 10.2.0.

This module should therefor require (as it is coded right now) at minimum a Drupal 10.2.0 instance and not >= 9, or edit the services.yml file so it doesn't use these advanced configurations.

🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇧🇪Belgium sneakysnk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024