@@ -9,15 +9,15 @@ Sometimes it may be necessary to integrate Symfony into a legacy application
9
9
where you do not initially have the level of control you require.
10
10
11
11
As stated elsewhere, Symfony Sessions are designed to replace the use of
12
- PHP's native `session_*() ` functions and use of the `$_SESSION `
12
+ PHP's native `` session_*() `` functions and use of the `` $_SESSION ` `
13
13
superglobal. Additionally, it is mandatory for Symfony to start the session.
14
14
15
15
However when there really are circumstances where this is not possible, it is possible
16
16
to use a special storage bridge
17
17
:class: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ PhpSessionStorage `
18
18
which is designed to allow Symfony to work with a session started outside of
19
19
the Symfony Session framework. You are warned that things can interrupt this
20
- use case unless you are careful: for example legacy application erases `$_SESSION `.
20
+ use case unless you are careful: for example legacy application erases `` $_SESSION ` `.
21
21
22
22
Typical use of this might look as follows::
23
23
@@ -37,4 +37,13 @@ Typical use of this might look as follows::
37
37
$session->start();
38
38
39
39
This will allow you to start using the Symfony Session API and allow
40
- migration of your application to Symfony Sessions.
40
+ migration of your application to Symfony Sessions.
41
+
42
+ .. note ::
43
+
44
+ Symfony Sessions store data like attributes in special 'Bags' which use a
45
+ key in the ``$_SESSION `` superglobal. This means that a Symfony Session
46
+ cannot access arbitary keys in ``$_SESSION `` that may be set by the legacy
47
+ application, although all the ``$_SESSION `` contents will be saved when
48
+ the session is saved.
49
+
0 commit comments