Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[2.3][Session] Give greater control over how and when session starts #7855

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
1 participant
@ghost

ghost commented Apr 26, 2013

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets na
License MIT
Doc PR symfony/symfony-docs#2475

Gives control over how start on demand works: allowing to turn it on or off and to allow bag access when session is off.

Rationale:
ON/OFF - Currently a session is auto-started on demand. This may not be desirable and it does make debugging code very difficult if you need to determine when and where magic is happening. This simply gives control.

OFF_LAX - this could be removed from the PR but it emulates native PHP behaviour when you can still read/write $_SESSION before a session is started.

@ghost Unknown commented on an outdated diff Apr 26, 2013

...tpFoundation/Session/Storage/NativeSessionStorage.php
@@ -53,14 +53,25 @@ class NativeSessionStorage implements SessionStorageInterface
protected $metadataBag;
/**
+ * @var Boolean
+ */
+ protected $mode;
+
+ /**
+ * @var Boolean
+ */
+ protected $emulatePhp;
@ghost

ghost Apr 26, 2013

Unused property

@fabpot fabpot closed this Jun 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment