Commit Graph

1377 Commits

Author SHA1 Message Date
Fabien Potencier
51a3d0ba6a refactored session configuration
The configuration names have been changed to avoid confusion (user was
ambiguous)

    Before:
          <app:user default_locale="fr">
              <app:session name="SYMFONY" type="Native" lifetime="3600" />
          </app:user>

    After:
          <app:session default_locale="fr" name="SYMFONY" storage_id="native" lifetime="3600" />
2010-11-10 10:47:03 +01:00
ornicar
6f034d2c80 [FrameworkBundle] Make the use_forward option of FormAuthenticationListener configurable 2010-11-10 07:53:03 +01:00
Fabien Potencier
513163648e fixed a unit test 2010-11-10 07:50:30 +01:00
GordonsLondon
bfae4ad86c [Form] PercentField fixed option collision 2010-11-10 07:49:53 +01:00
Fabien Potencier
4cd5b2b1ff [WebProfilerBundle] fixed redirection interceptions (we must keep as many headers as possible) 2010-11-09 22:48:02 +01:00
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
Fabien Potencier
d7d4880a90 [TwigBundle] updated filters for the latest version of Twig 2010-11-07 20:37:51 +01:00
Oleg Zinchenko
6f28511ee4 [Form] add type for FileField class 2010-11-06 19:34:30 +01:00
Fabien Potencier
4d4f9f344e added request attributes in the request data collector and web profiler 2010-11-06 16:47:49 +01:00
Fabien Potencier
a471f65759 [HttpKernel] tweaked HttpKernelInterface 2010-11-06 15:13:23 +01:00
Fabien Potencier
bf5b8d8007 [DoctrineBundle] fixed unit tests 2010-11-06 14:51:06 +01:00
jeff
52ec8752d8 When route_attributes is null an exception is raised. 2010-11-06 14:34:08 +01:00
Fabien Potencier
f6cd582afc [HttpKernel] updated bootstrap.php 2010-11-05 02:35:30 +01:00
Jordi Boggiano
43b81fa1f8 [DoctrineBundle] Coding style fixes 2010-11-03 18:44:26 +01:00
Fabien Potencier
ca485eb4ce [DoctrineBundle] fixed CS 2010-11-03 18:43:50 +01:00
Jordi Boggiano
4fc10310ef [DoctrineBundle] Added callbacks to override the default serialization and deserialization of the CollectionToStringTransformer 2010-11-03 18:39:26 +01:00
Johannes Schmitt
6aacfa3216 fixes a bug where in most cases cookies with path / were not set properly 2010-11-03 18:33:50 +01:00
Fabien Potencier
1e13ecb5f3 [TwigBundle] split the route tag to 2 tags: path and url 2010-11-03 18:15:54 +01:00
Kris Wallsmith
c991b250ea [DependencyInjection] updated TaggedContainerInterface to extend ContainerInterface 2010-11-03 17:16:57 +01:00
Jordi Boggiano
e7ea2eb433 [FrameworkBundle] Ensuring the exception page renders even when the Request format is unknown to Symfony 2010-11-03 15:30:55 +01:00
Skorney
a5d28d2c1b Fix security.authentication.form.options array to be not empty 2010-11-03 15:17:26 +01:00
ornicar
1d9aa5bf8a [HttpKernel] Fix parameters order in Client::filterRequest 2010-11-03 15:15:24 +01:00
ornicar
cf8d473313 [BrowserKit] Fix parameters order in Client::submit 2010-11-03 15:15:21 +01:00
IamPersistent
ac8e35549e added initiating template in renderWidget 2010-11-03 15:07:26 +01:00
Fabien Potencier
5bd03e1c58 [HttpKernel] added unit tests for ESI 2010-11-02 20:00:18 +01:00
Fabien Potencier
556bfcb804 [HttpKernel] added some more unit tests 2010-11-02 18:38:11 +01:00
Fabien Potencier
a19cdce1bc [Security] added some missing unit tests 2010-10-31 23:41:36 +01:00
Fabien Potencier
58bd4acdd1 [Translation] added some unit tests 2010-10-31 23:23:42 +01:00
Fabien Potencier
ec417578ca [Security] added unit tests to some authenticated providers (code coverage is more than 96% for the Security component now) 2010-10-31 15:41:15 +01:00
Fabien Potencier
52e03e8885 simplified code 2010-10-31 14:45:04 +01:00
Fabien Potencier
1185a26eb9 [HttpKernel] simplified code a bit 2010-10-31 14:44:35 +01:00
jeff
9acda523b1 Fix typo in RedirectController 2010-10-31 13:42:03 +01:00
Kris Wallsmith
37d8fe1440 [DoctrineMongoDBBundle] fixed profiler menu text 2010-10-31 13:41:14 +01:00
Fabien Potencier
3d5054f21f [Security] added unit tests for the Authentication sub-namespace 2010-10-31 13:39:12 +01:00
Fabien Potencier
eb4d51f181 [HttpKernel] fixed phpdoc typos 2010-10-31 12:55:30 +01:00
Fabien Potencier
3506dfabff [HttpKernel] added a return value to the purge() method of the Cache store class 2010-10-30 21:15:43 +02:00
Fabien Potencier
dd9b77ed96 [HttpFoundation] added Response::setVary() 2010-10-30 21:02:05 +02:00
jeff
ae888b80f6 [HttpFoundation] removed port number from HOST header
To be consistent with backup values (SERVER_NAME, SERVER_ADDR).
fix a problem with getUriForPath($path) where port number may be present twice.
2010-10-28 15:14:48 +02:00
jeff
a5d4acc54d [HttpFoundation] updated get() signature to get($key, $default = null, $first = true)
This is more consistent with the get() method of ParameterBag
2010-10-28 15:12:48 +02:00
Fabien Potencier
a4fbf74593 added a user provider for Doctrine MongoDB 2010-10-28 15:04:29 +02:00
Fabien Potencier
b9f33a610e removed code related to Propel support 2010-10-28 14:52:34 +02:00
Fabien Potencier
88d30f0d74 removed Propel bundle (it has been moved as an independant bundle) 2010-10-28 14:42:19 +02:00
Fabien Potencier
13f36b1657 Removed logic that tried to avoid double-escaping
Because that's just not possible (have a look at the unit tests to see all possibilities
-- as you will notice, there is no way we can determine the context and whether the
data are already escaped or not).

So, we always escape data, which means that sometimes, we will try to escape already
escaped data. This is not a problem for everything except strings. That's because
strings are not wrapped with an object like everything else (for performance reason).

This means that all escapers must be able to avoid double-escaping (that's the case
for the default escapers as both htmlspecialchars() and htmlentities() have a flag
that does just this).
2010-10-28 13:32:10 +02:00
Fabien Potencier
3eee458430 [OutputEscaper] replaced the JS escaper with the one from Twig 2010-10-28 13:31:02 +02:00
Fabien Potencier
ac880f26a8 [FrameworkBundle] fixed missing variable 2010-10-28 13:00:12 +02:00
Fabien Potencier
4cf5b440a9 [OutputEscaper] fixed variable init 2010-10-28 13:00:12 +02:00
Fabien Potencier
2b613f34d5 [FrameworkBundle] removed the need for decorating with SafeDecorator 2010-10-28 11:50:33 +02:00
Fabien Potencier
7e6bddedf9 [TwigBundle] moved Form extension initialization as late as possible
Because

 * it's better for performance (no need to init form templates if there is no forms)
 * right now, it crashes for all renderer except HTML (because the form templates obviously only exist for the HTML renderer)

The only other possible fix would be to force those resources to always use the HTML renderer
2010-10-28 09:50:00 +02:00
Fabien Potencier
7f8c540a20 [Routing] fixed XML loader on Windows (there is no need to urlencode here as schemaValidate() takes a filename, not a URL) 2010-10-28 09:17:11 +02:00
Fabien Potencier
c448429e62 [HttpFoundation] fixed date format for HTTP headers (format must be RFC1123, not RFC2822 -- the difference is that RFC1123 dates always use GMT for the timezone) 2010-10-27 10:56:56 +02:00