Remove ContainerAwareTrait from CacheFactory and ChainedFastBackendFactory

Created on 19 January 2024, 11 months ago
Updated 13 March 2024, 10 months ago

Problem/Motivation

In πŸ“Œ Fork Symfony's ContainerAwareTrait and ContainerAwareInterface into core Needs work we are trying to reduce the use of ContainerAwareTrait as Symfony has deprecated it.

CacheFactory and ChainedFastBackendFactory are container aware because they need to retrieve cache backend services by ID.

Because these are low-level services they sometimes need to be accessed at container build time, which means we can't inject a service locator that only contains cache bins; instead it appears the simplest solution is just to continue injecting the entire container.

Steps to reproduce

Proposed resolution

Add setContainer() methods directly to the services.

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
CacheΒ  β†’

Last updated 4 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom longwave UK

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