Remove ContainerAwareTrait from session middleware

Created on 8 February 2024, 11 months ago
Updated 14 March 2024, 10 months ago

Problem/Motivation

In #3392616-5: Update to Symfony 6.4 β†’ we've found out that the Symfony\Component\DependencyInjection\ContainerAwareTrait and Symfony\Component\DependencyInjection\ContainerAwareInterface are being deprecated in Symfony 6.4 and removed in 7.0.

Drupal\Core\StackMiddleware\Session is container aware because of the following comment:

 * Note, the session service is not injected into this class in order to prevent
 * premature initialization of session storage (database). Instead the session
 * service is retrieved from the container only when handling the request.

Steps to reproduce

Proposed resolution

Wrap the session service in a closure to ensure it is only instantiated when necessary.

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
BaseΒ  β†’

Last updated about 5 hours 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