Skip to content

Commit ae77706

Browse files
author
Drak
committed
Add cookbook entry.
1 parent 39c66ce commit ae77706

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

cookbook/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The Cookbook
2525
debugging
2626
event_dispatcher/index
2727
request/index
28+
session/index
2829
profiler/index
2930
web_services/index
3031
symfony1

cookbook/map.rst.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102

103103
* :doc:`/cookbook/request/mime_type`
104104

105+
* :doc:`/cookbook/session/index`
106+
107+
* :doc:`/cookbook/session/php_bridge`
108+
105109
* :doc:`/cookbook/routing/index`
106110

107111
* :doc:`/cookbook/routing/scheme`

cookbook/sessions/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Sessions
2+
========
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
php_bridge

cookbook/sessions/php_bridge.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. index::
2+
single: Sessions
3+
4+
Bridge a legacy application with Symfony Sessions
5+
--------------------------------------------------------
6+
7+
.. versionadded:: 2.3
8+
Added ability to integrate with a legacy PHP session
9+
10+
You may take advantage of the PHP Bridge Session when integrating
11+
a legacy application into the Symfony Full Stack Framework when it
12+
may not be possible to avoid the legacy application starting the
13+
session with ``session_start()``
14+
15+
If the application has sets it's own PHP save handler, you can
16+
specify null for the ``handler_id``:
17+
18+
.. code-block:: yml
19+
20+
framework:
21+
session:
22+
storage_id: session.storage.php_bridge
23+
handler_id: ~
24+
25+
Otherwise, if the problem is simply that you cannot avoid the application
26+
starting the session with ``session_start()`` but you can still make use of
27+
a Symfony based session save handler, you can specify the save handle
28+
as in the example below:
29+
30+
.. code-block:: yml
31+
32+
framework:
33+
session:
34+
storage_id: session.storage.php_bridge
35+
handler_id: session.handler.native_file
36+

0 commit comments

Comments
 (0)