This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/HttpKernel
Fabien Potencier 7b02766373 fixed session management
Some explanations on how it works now:

 * The Session is an optional dependency of the Request. If you create the
   Request yourself (which is mandatory now in the front controller) and if
   you don't inject a Session yourself (which is recommended if you want the
   session to be configured via dependency injection), the Symfony2 Kernel
   will associate the Session configured in the Container with the Request
   automatically.

 * When duplicating a request, the session is shared between the parent and
   the child (that's because duplicated requests are sub-requests of the main
   one most of the time.) Notice that when you use ::create(), the behavior is
   the same as for the constructor; no session is attached to the Request.

 * Symfony2 tries hard to not create a session cookie when it is not needed
   but a Session object is always available (the cookie is only created when
   "something" is stored in the session.)

 * Symfony2 only starts a session when:

   * A session already exists in the request ($_COOKIE[session_name()] is
     defined -- this is done by RequestListener);

   * There is something written in the session object (the cookie will be sent
     to the Client).

 * Notice that reading from the session does not start the session anymore (as
   we don't need to start a new session to get the default values, and because
   if a session exists, it has already been started by RequestListener.)
2010-11-09 22:34:48 +01:00
..
Bundle Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Cache [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
Controller [HttpKernel] simplified code a bit 2010-10-31 14:44:35 +01:00
DataCollector added request attributes in the request data collector and web profiler 2010-11-06 16:47:49 +01:00
Debug Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Exception Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Log Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Profiler added request attributes in the request data collector and web profiler 2010-11-06 16:47:49 +01:00
Resources/bin removed Symfony\Framework 2010-09-17 12:58:24 +02:00
Security [HttpKernel\Security]Fixed use statement and updated parameters constructor 2010-10-24 09:55:40 +02:00
Test Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
BaseHttpKernel.php [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
bootstrap.php [HttpKernel] updated bootstrap.php 2010-11-05 02:35:30 +01:00
ClassCollectionLoader.php Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00
Client.php [HttpKernel] Fix parameters order in Client::filterRequest 2010-11-03 15:15:24 +01:00
HttpKernel.php fixed session management 2010-11-09 22:34:48 +01:00
HttpKernelInterface.php [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
Kernel.php [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
ResponseListener.php Removed all those spaces after @author that were bothering me so… 2010-10-18 16:55:41 +02:00