-
-
Notifications
You must be signed in to change notification settings - Fork 34
Add session handling to roadrunner symfony bridge #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add session handling to roadrunner symfony bridge #47
Conversation
if ($hasRequestSession) { | ||
$session = $sfRequest->getSession(); | ||
|
||
$sessionId = \session_id(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we using PHP's built-in sessions? In particular, these won't work across multiple servers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symfony uses this also when used Redis or other Session handlers all are calling that method to get the session_id thats why I call it here. I was afraid accessing again the session a new session start is trigger so I did directly access the session_id
like here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But there are still open problems, so this is still WIP. Have a look at #46 for which things are currently not resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described in the issue alternative solution would be which I personally would prefer that maybe symfony add an option to write the cookie
at: https://github.com/symfony/symfony/blob/bbb0a694fbbd5a527b2236636271a47122b5d47c/src/Symfony/Component/HttpKernel/EventListener/AbstractSessionListener.php#L110 to $request
object this would make less problems for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to create a new private method or two
2a9c0fd
to
334720c
Compare
334720c
to
92a38a8
Compare
Thank you. Let's merge this and handle the other issues in a separate PR. |
Fix parts of #46
The session still have the following problems::