Skip to content

Is it possible cookie based session start? #7

Open
@ismailbaskin

Description

@ismailbaskin
No description provided.

Activity

AndrewCarterUK

AndrewCarterUK commented on Mar 23, 2016

@AndrewCarterUK
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ismailbaskin@AndrewCarterUK

        Issue actions

          Is it possible cookie based session start? · Issue #7 · PHPFastCGI/SpeedfonyBundle