Merge branch '2.3' into 2.7
This commit is contained in:
commit
04f1363bfb
@ -683,16 +683,16 @@ class FrameworkExtension extends Extension
|
|||||||
if (class_exists('Symfony\Component\Security\Core\Exception\AuthenticationException')) {
|
if (class_exists('Symfony\Component\Security\Core\Exception\AuthenticationException')) {
|
||||||
$r = new \ReflectionClass('Symfony\Component\Security\Core\Exception\AuthenticationException');
|
$r = new \ReflectionClass('Symfony\Component\Security\Core\Exception\AuthenticationException');
|
||||||
|
|
||||||
$legacyTranslationsDir = dirname($r->getFilename()).'/../../Resources/translations';
|
|
||||||
|
|
||||||
if (file_exists($legacyTranslationsDir)) {
|
|
||||||
// in Symfony 2.3, translations are located in the symfony/security package
|
|
||||||
$dirs[] = $legacyTranslationsDir;
|
|
||||||
} else {
|
|
||||||
// with Symfony 2.4, the Security component was split into several subpackages
|
// with Symfony 2.4, the Security component was split into several subpackages
|
||||||
// and the translations have been moved to the symfony/security-core package
|
// and the translations have been moved to the symfony/security-core package
|
||||||
$dirs[] = dirname($r->getFilename()).'/../Resources/translations';
|
$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;
|
||||||
}
|
}
|
||||||
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
|
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
|
||||||
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
|
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
|
||||||
|
Reference in New Issue
Block a user