Enable service autowiring by adding interface aliases to core service definitions

Created on 19 April 2019, about 5 years ago
Updated 6 October 2023, 8 months ago

Problem/Motivation

Symfony 4 will drop support for magic autowiring, expecting services to be aliased - see their docs and @weaverryan's Drupalcon session.

Proposed resolution

Add interface aliases to core services as described in Working with Interfaces, while keeping the existing service names intact.
Then update core services to use autowiring instead of explicit service names as arguments.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Drupal 10.1.0 fixes a bug in Drupal's dependency injection container that could allow certain private services to be accessed by $container->get() depending on code execution order. Custom or contributed module code accessing services in this way would have been fragile before the change, but will now always break. Public services are unaffected.

πŸ“Œ Task
Status

Fixed

Version

10.1 ✨

Component
BaseΒ  β†’

Last updated 1 minute ago

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

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.

Production build 0.69.0 2024