Skip to content
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

Is it possible cookie based session start? #7

Open
ismailbaskin opened this issue Mar 23, 2016 · 1 comment
Open

Is it possible cookie based session start? #7

ismailbaskin opened this issue Mar 23, 2016 · 1 comment

Comments

@ismailbaskin
Copy link
Contributor

No description provided.

@AndrewCarterUK
Copy link
Member

Hi @ismailbaskin

The PHP session extension (session_start(), $_SESSION) is not compatible with multiple request dispatch cycles. I also don't believe that Symfony sessions are easily compatible with a multiple request dispatch cycle without some wizardry - as the session is an entry in the container.

If you're creating a new app, I would strongly recommend not using Symfony sessions and instead creating your own abstraction using the cookie header.

Otherwise you will need to override the way that the Framework Bundle attaches the session to the request:

https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php

I'm currently researching how best to do this and you might wish to subscribe to the issue I just created in the Symfony project repository: symfony/symfony#18273

I'll update this thread as I get answers from the Symfony repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants