Skip to content

Commit bd765c1

Browse files
authored
Update outdated session documentation with SF 4
1 parent 1952d7c commit bd765c1

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

components/http_foundation/session_configuration.rst

-53
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ The Symfony HttpFoundation component provides some by default and these can
7272
easily serve as examples if you wish to write your own.
7373

7474
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler`
75-
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler`
7675
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler`
7776
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler`
7877
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler`
@@ -262,58 +261,6 @@ particular cookie by reading the ``getLifetime()`` method::
262261
The expiry time of the cookie can be determined by adding the created
263262
timestamp and the lifetime.
264263

265-
PHP 5.4 Compatibility
266-
~~~~~~~~~~~~~~~~~~~~~
267-
268-
Since PHP 5.4.0, :phpclass:`SessionHandler` and :phpclass:`SessionHandlerInterface`
269-
are available. Symfony provides forward compatibility for the :phpclass:`SessionHandlerInterface`
270-
so it can be used under PHP 5.3. This greatly improves interoperability with other
271-
libraries.
272-
273-
:phpclass:`SessionHandler` is a special PHP internal class which exposes native save
274-
handlers to PHP user-space.
275-
276-
In order to provide a solution for those using PHP 5.4, Symfony has a special
277-
class called :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler`
278-
which under PHP 5.4, extends from ``\SessionHandler`` and under PHP 5.3 is just a
279-
empty base class. This provides some interesting opportunities to leverage
280-
PHP 5.4 functionality if it is available.
281-
282-
Save Handler Proxy
283-
~~~~~~~~~~~~~~~~~~
284-
285-
A Save Handler Proxy is basically a wrapper around a Save Handler that was
286-
introduced to seamlessly support the migration from PHP 5.3 to PHP 5.4+. It
287-
further creates an extension point from where custom logic can be added that
288-
works independently of which handler is being wrapped inside.
289-
290-
There are two kinds of save handler class proxies which inherit from
291-
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy`:
292-
they are :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy`
293-
and :class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy`.
294-
295-
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage`
296-
automatically injects storage handlers into a save handler proxy unless already
297-
wrapped by one.
298-
299-
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy`
300-
is used automatically under PHP 5.3 when internal PHP save handlers are specified
301-
using the ``Native*SessionHandler`` classes, while
302-
:class:`Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy`
303-
will be used to wrap any custom save handlers, that implement :phpclass:`SessionHandlerInterface`.
304-
305-
From PHP 5.4 and above, all session handlers implement :phpclass:`SessionHandlerInterface`
306-
including ``Native*SessionHandler`` classes which inherit from :phpclass:`SessionHandler`.
307-
308-
The proxy mechanism allows you to get more deeply involved in session save handler
309-
classes. A proxy for example could be used to encrypt any session transaction
310-
without knowledge of the specific save handler.
311-
312-
.. note::
313-
314-
Before PHP 5.4, you can only proxy user-land save handlers but not
315-
native PHP save handlers.
316-
317264
.. _`php.net/session.customhandler`: http://php.net/session.customhandler
318265
.. _`php.net/session.configuration`: http://php.net/session.configuration
319266
.. _`php.net/memcached.setoption`: http://php.net/memcached.setoption

0 commit comments

Comments
 (0)