Commit Graph

1257 Commits

Author SHA1 Message Date
Fabien Potencier
92f3d9e7ec [DependencyInjection] removed the leading _ for anonymous service ids (the usage of strtr() in the conversion between ids and methods does not take leading _ into account like camelize() does) 2010-11-15 09:56:20 +01:00
Fabien Potencier
a45baed812 [HttpFoundation] removed optimization for setLocale() as it breaks when locale is not the default and the user wants to switch back to the default locale 2010-11-15 09:50:01 +01:00
Ryan Weaver
58a240baba [HttpFoundation] Allow the SERVER_PORT key of the server ParameterBag in Request to be a string value without confusing Request::getHttpHost().
The idea of a string port is probably semantically wrong, but it actually follows the convention of at least some web servers ($_SERVER['SERVER_PORT'] is actually a string). And since the $port variable is used as a string in getHttpHost(), it's correct to allow the types not to match.
2010-11-15 09:45:59 +01:00
Kris Wallsmith
6428544cd8 [DoctrineMongoDBBundle] added a phpdoc block 2010-11-15 09:43:39 +01:00
Kris Wallsmith
b932441ac9 [DoctrineMongoDBBundle] added ability to register global listeners and subscribers via the DIC 2010-11-15 09:43:32 +01:00
Kris Wallsmith
da188734d8 [DoctrineMongoDBBundle] added support for multiple event managers to the DIC extension 2010-11-15 09:42:45 +01:00
Kris Wallsmith
9ab33e4ae4 [DoctrineMongoDBBundle] added registration of event listeners and subscribers via service container tags 2010-11-15 09:40:28 +01:00
Fabien Potencier
519cc09488 [Translation] added some unit tests for the new YAML loader 2010-11-15 09:37:04 +01:00
Jordi Boggiano
3813eecf17 [Translation] Added YamlFileLoader 2010-11-15 09:33:00 +01:00
Jordi Boggiano
f2107e4b3a [Translation] Explicitly mark methods as public 2010-11-15 09:29:18 +01:00
Ryan Weaver
81272b22fa [HttpFoundation] Adding PHPDoc to the Request class and removing two unused variables. 2010-11-13 16:03:57 +01:00
Jordi Boggiano
7bf77cb500 [FrameworkBundle] Add comment to clarify the request service issue 2010-11-13 14:50:32 +01:00
Francis Besset
35148c5ac3 [FrameworkBundle] added routing internationalization
In your routing.yml:

homepage:
    pattern:  /:_locale
    defaults: { _controller: MyBundle:MyController:index, _locale: en }
    requirements: { _locale: (en|fr) }

In your PHP template:

<?php echo $view['session']->getLocale() ?>
2010-11-13 14:33:47 +01:00
Fabien Potencier
6f898a5008 [HttpKernel] made some tests more robust 2010-11-13 12:29:14 +01:00
Fabien Potencier
4aa5ef63f5 [HttpKernel] made some tests more robust 2010-11-13 12:22:38 +01:00
Fabien Potencier
98f3ac65f4 fixed configuration bugs 2010-11-12 20:11:22 +01:00
Fabien Potencier
7257571be4 [HttpFoundation] added missing code for last commit 2010-11-12 19:49:01 +01:00
Fabien Potencier
942104a5ff [HttpFoundation] added a setCache() method to ease setting the HTTP cache headers in one simple call 2010-11-12 19:46:39 +01:00
Fabien Potencier
f669674293 [HttpFoundation] added a missing phpdoc 2010-11-12 19:46:22 +01:00
Fabien Potencier
f6ddeeb36b [HttpFoundation] added Response::setPublic() and changed setPrivate() to not take any argument 2010-11-12 19:45:28 +01:00
Fabien Potencier
8b9e979118 [FrameworkBundle] changed configuration to always include the session service 2010-11-12 19:35:21 +01:00
jeff
69cd21d8be [Validator] Fixed annotation loader to not add parent constraints twice 2010-11-12 17:56:09 +01:00
Bernhard Schussek
48b3e92504 [Form] Fixed: parent::configure() should always be called after adding options to overrule options in the parent class 2010-11-12 17:55:52 +01:00
Jordi Boggiano
d94c581f42 [TwigBundle] fixed instanceof check to include all FieldGroup like classes 2010-11-12 17:55:30 +01:00
Jordi Boggiano
a198bbcf43 [Form] throw an exception if session_id() is empty when a csrf token is generated 2010-11-12 17:53:29 +01:00
ever.zet
4c340c5cc9 [Form] fixed forms grouped validation
Added ability to specify **match-all** validation group, which
constraints will runs on every specified validation group.
Added groups="*" option to `Form::data` Valid validator.
2010-11-12 17:53:17 +01:00
Bernhard Schussek
f5b451f5b9 [Form] Fixed MoneyToLocalizedStringTransformer and added tests 2010-11-12 17:52:56 +01:00
Fabien Potencier
5860bdd75a [FrameworkBundle] re-added a fake request service so that you can rely on it when defining services with a dependency on it 2010-11-12 17:40:51 +01:00
Fabien Potencier
efed6005cb [DependencyInjection] fixed PHP dumper
In the dumped PHP class, we must use get() and not get*Service() methods to get services.
That's because all calls must be managed by get(). From the outside, you can call
get*Service() because as they are protected, they are caught by the __call() method;
which is not the case obviously when it is used internally.

If not, if you override a service with set(), this won't work when a service
depends on this one (the default one will still be used).
2010-11-12 17:38:32 +01:00
Fabien Potencier
44ccd44dd6 [Routing] fixed ApacheMatcherDumper default config 2010-11-11 23:22:15 +01:00
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