- π«π·France andypost
Cookie cleaning since SF 5.6 but the issue was lost
Drupal implemented much of Symfony's session handling logic in the D8 cycle in #2229145: Register symfony session components in the DIC and inject the session service into the request object β . However, Symfony's SessionListener was not [separately?] implemented. I can't find any comments specific to this point, but it appears that perhaps this was omitted because Drupal could just as easily add the session manager to the DIC and provide access to session data, there? Regardless, this isn't much of an issue for most users, except:
I come to this issue from the second avenue, but the problem remains the same - PHP's native session handling is a bit janky and incompatible with alternative servers.
Symfony apps that more directly implement the HttpKernel
component received updates in 5.4 which convert the session cookie from being set natively by PHP and lifts it into the response object. Drupal can and should stay closer to the Symfony trunk and in doing so receive this compatibility improvement. Daffie's Swoole module more or less include this change in a patched version of SessionManager
, but there's no reason we should have to do so there if we could use Symfony's shipped session listener, instead.
That speaks to the response handling of the Symfony SessionListener
; the request side sets the session on the request object. Drupal handles this in middleware. However, the Symfony SessionListener
does basically the same thing, including saving the session. See https://git.drupalcode.org/project/drupal/-/blob/9018da4a5b181bc0fa3fbe2...
Witness Drupal not being compatible with Swoole/PHP-PM/etc. or weirdness with session handling as described above.
Replace Drupal's bespoke Session
stack middleware and implement more native compatibility with CLI invocation by implementing Symfony's SessionListener
.
None
Session stack middleware removal.
Active
11.0 π₯
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Cookie cleaning since SF 5.6 but the issue was lost