symfony/symfony — pull request #7855 by drak (2013-04-26 09:24:39+00:00)
Title: [2.3][Session] Give greater control over how and when session starts

| 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.