Merge branch '2.3' into 2.7

This commit is contained in:
Nicolas Grekas 2015-10-06 14:54:48 +02:00
commit 99bf879559

View File

@ -683,16 +683,7 @@ class FrameworkExtension extends Extension
if (class_exists('Symfony\Component\Security\Core\Exception\AuthenticationException')) {
$r = new \ReflectionClass('Symfony\Component\Security\Core\Exception\AuthenticationException');
// with Symfony 2.4, the Security component was split into several subpackages
// and the translations have been moved to the symfony/security-core package
$translationsDir = dirname($r->getFilename()).'/../Resources/translations';
if (!file_exists($translationsDir) && file_exists($dir = dirname($r->getFilename()).'/../../Resources/translations')) {
// in Symfony 2.3, translations are located in the symfony/security package
$translationsDir = $dir;
}
$dirs[] = $translationsDir;
$dirs[] = dirname($r->getFilename()).'/../Resources/translations';
}
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {