Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Beta phase evaluation
Issue category | Task because its part of the larger session work |
---|---|
Issue priority | Normal, because the impact isn't that high. Things still work as they are at the moment. |
Disruption | No disruption, its a cleanup only patch |
Problem/Motivation
There are still quite some references to Session Manager and the session_manager
service throughout core, despite the fact that as of #2229145: Register symfony session components in the DIC and inject the session service into the request object, the session should be accessed and controlled via the SessionInterface
obtained from $request->getSession()
.
Proposed resolution
- Replace direct access of
session_manager
service with symfony sessions obtained from the request wherever possible.
Regrettably there is still one place where we need to reference it directly (user_logout(), see also the comment there).
- Update documentation wherever necessary.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff.txt | 1.27 KB | znerol |
#11 | replace_references_to-2478119-11.patch | 9.07 KB | znerol |
#9 | replace_references_to-2478119-9.patch | 8.58 KB | andypost |
#8 | replace_references_to-2478119-8.patch | 8.58 KB | znerol |
#8 | interdiff.txt | 1.92 KB | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedComment #3
znerol CreditAttribution: znerol commentedBrowserTestBase
uses a different public ad-hoc property in order to store the session id on the account thanWebTestBase
:(Comment #4
andypostlooks great, any idea how to check that session manager should not be used?
Probably IS needs update with that
Comment #5
znerol CreditAttribution: znerol commentedRegrettably there is still one place where we need to reference it directly (
user_logout()
, see also the comment there). Sopublic: false
does not buy us anything here.Comment #6
dawehnerThis itself is way better to understand. ... its about the session
Comment #7
dawehnerSo yeah is there anything left for the RTBC? I updated the issue summary with a beta evaluation and documented the
user_logout()
.Comment #8
znerol CreditAttribution: znerol commentedLooks like #3 contains hunks from #2478167: Generate proper value for sessionName property in BrowserTestBase. Other than that the patch is complete I think.
Comment #9
andyposthttps://github.com/symfony/symfony/issues/12375 still open so
user_logout()
not the case, maybe we need separate issue for that...Just a re-roll so RTBC
Comment #10
alexpottThis looks good and an obvious followup from all the current work on sessions.
The method document needs updating (sorry this seems quite minor).
Comment #11
znerol CreditAttribution: znerol commentedDone.
Comment #12
alexpottCommitted a108bf0 and pushed to 8.0.x. Thanks!
I agree that this is allowable under the beta followup to other work clause.