Skip to content

Commit 5e5adff

Browse files
author
Drak
committed
[HttpFoundation][FrameworkBundle] Keep save auto_start behaviour as in 2.2 and make component values consistent with FrameworkBundle's configuration options.
1 parent d048d8a commit 5e5adff

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Session/Storage/SessionStorageInterface.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ interface SessionStorageInterface
2828
* Do not start session on demand and throw exception if attempt
2929
* is make to read or write bag data.
3030
*/
31-
const NO_START_ON_DEMAND_STRICT = 0;
31+
const NO_START_ON_DEMAND_STRICT = 'off';
3232

3333
/**
3434
* Start the session on demand when accessing bag data.
3535
*/
36-
const START_ON_DEMAND = 1;
36+
const START_ON_DEMAND = 'on';
3737

3838
/**
3939
* Do not start session on demand but allow access to session bags.
4040
*/
41-
const NO_START_ON_DEMAND_LAX = 2;
41+
const NO_START_ON_DEMAND_LAX = 'off_lax';
4242

4343
/**
4444
* Starts the session.
4545
*
46-
* @throws \RuntimeException If something goes wrong starting the session.
46+
* @throws \RuntimeException If something goes wrong starting the session
4747
*
48-
* @return boolean True if started.
48+
* @return boolean True if started
4949
*
5050
* @api
5151
*/
@@ -54,14 +54,14 @@ public function start();
5454
/**
5555
* Checks if the session is started.
5656
*
57-
* @return boolean True if started, false otherwise.
57+
* @return boolean True if started, false otherwise
5858
*/
5959
public function isStarted();
6060

6161
/**
6262
* Returns the session ID
6363
*
64-
* @return string The session ID or empty.
64+
* @return string The session ID or empty
6565
*
6666
* @api
6767
*/
@@ -79,7 +79,7 @@ public function setId($id);
7979
/**
8080
* Returns the session name
8181
*
82-
* @return mixed The session name.
82+
* @return mixed The session name
8383
*
8484
* @api
8585
*/
@@ -105,11 +105,11 @@ public function setName($name);
105105
* Note regenerate+destroy should not clear the session data in memory
106106
* only delete the session data from persistent storage.
107107
*
108-
* @param Boolean $destroy Destroy session when regenerating?
108+
* @param Boolean $destroy Flag true to destroy session when regenerating
109109
* @param integer $lifetime Sets the cookie lifetime for the session cookie. A null value
110110
* will leave the system settings unchanged, 0 sets the cookie
111111
* to expire with browser session. Time is in seconds, and is
112-
* not a Unix timestamp.
112+
* not a Unix timestamp
113113
*
114114
* @return Boolean True if session regenerated, false if error
115115
*
@@ -128,7 +128,7 @@ public function regenerate($destroy = false, $lifetime = null);
128128
* it should actually persist the session data if required.
129129
*
130130
* @throws \RuntimeException If the session is saved without being started, or if the session
131-
* is already closed.
131+
* is already closed
132132
*/
133133
public function save();
134134

0 commit comments

Comments
 (0)