Remove duplicate ContainerInjectionInterface / AutowireTrait for services

Created on 6 October 2025, 10 days ago
Updated 13 October 2025, 3 days ago

When defining a service via service.yml, we tell drupal how to instantiate the class by either:

- providing `arguments:`
- using `autowire: true`

This means any implementations of `ContainerInjectionInterface` that provide a `create()` method are not needed - they are skipped.
The most common case of this is probably `use AutowriteTrait;`.

References to such create method should be removed from the code.

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇩🇪Germany twiesing

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024