Commit 78a9a90a authored by Fabien Potencier's avatar Fabien Potencier

Merge branch '1.2'

* 1.2:
  Minor optimization in ValidatorServiceProvider
  bumped version to 1.2.2-DEV
  prepared the 1.2.1 release
  updated CHANGELOG
  added a caution about how to configure security for php-cgi/Apache

Conflicts:
	doc/changelog.rst
	doc/phar.rst
	src/Silex/Application.php
	src/Silex/Provider/ValidatorServiceProvider.php
parents da16dfb1 73652ba0
...@@ -9,6 +9,18 @@ Changelog ...@@ -9,6 +9,18 @@ Changelog
* [BC BREAK] Locale management has been moved to LocaleServiceProvider which must be registered * [BC BREAK] Locale management has been moved to LocaleServiceProvider which must be registered
if you want Silex to manage your locale (must also be registered for the translation service provider) if you want Silex to manage your locale (must also be registered for the translation service provider)
1.2.2 (2014-XX-XX)
------------------
* n/a
1.2.1 (2014-07-01)
------------------
* added support permissions in the Monolog provider
* fixed Switfmailer spool where the event dispatcher is different from the other ones
* fixed locale when changing it on the translator itself
1.2.0 (2014-03-29) 1.2.0 (2014-03-29)
------------------ ------------------
......
...@@ -158,6 +158,19 @@ When the user is authenticated, the user stored in the token is an instance of ...@@ -158,6 +158,19 @@ When the user is authenticated, the user stored in the token is an instance of
`User `User
<http://api.symfony.com/master/Symfony/Component/Security/Core/User/User.html>`_ <http://api.symfony.com/master/Symfony/Component/Security/Core/User/User.html>`_
.. caution::
If you are using php-cgi under Apache, you need to add this configuration
to make things work correctly:
.. code-block:: apache
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
Securing a Path with a Form Securing a Path with a Form
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -29,9 +29,9 @@ class ValidatorServiceProvider implements ServiceProviderInterface ...@@ -29,9 +29,9 @@ class ValidatorServiceProvider implements ServiceProviderInterface
public function register(Container $app) public function register(Container $app)
{ {
$app['validator'] = function ($app) { $app['validator'] = function ($app) {
if (isset($app['translator']) && method_exists($app['translator'], 'addResource')) {
$r = new \ReflectionClass('Symfony\Component\Validator\Validator'); $r = new \ReflectionClass('Symfony\Component\Validator\Validator');
if (isset($app['translator']) && method_exists($app['translator'], 'addResource')) {
$app['translator']->addResource('xliff', dirname($r->getFilename()).'/Resources/translations/validators.'.$app['locale'].'.xlf', $app['locale'], 'validators'); $app['translator']->addResource('xliff', dirname($r->getFilename()).'/Resources/translations/validators.'.$app['locale'].'.xlf', $app['locale'], 'validators');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment