Provide service aliases for autowiring

Created on 24 July 2025, 4 days ago

Problem/Motivation

Drupal utilizes the Symfony service container, however some features such as autowiring and autoconfiguration were not leveraged in Drupal 8. Since Drupal 9.3, services can be autowired. This means that when defining a service in *.services.yml, in many cases the arguments can be automatically inferred from the typehints on constructor arguments. More information on service autowiring in Drupal can be found in the change record .

Proposed resolution

In order for other (custom) modules using services provided by this module to be autowired, aliases needs to be added for classes and non-ambiguous core interfaces (i.e. interfaces that only have a single implementation). It's not required for services of this module to use autowire: true, that would only be possible if the module only supports Drupal 9.3.0 or higher.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024