Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299334

Remove ContainerAwareTrait from session middleware

$
0
0

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.

SessionManager injects the database service but only uses it in the delete() method.

Steps to reproduce

Proposed resolution

Inject the database service into SessionManager using a service closure

Inject the session service as normal into the Session middleware.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 299334

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>