Skip to content

Commit

Permalink
[FrameworkBundle] [Security] Remove trans from the security/core in 2…
Browse files Browse the repository at this point in the history
….3 & dir loading
  • Loading branch information
maxime.steinhausser committed Oct 6, 2015
1 parent ea10f24 commit 1ed07a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 150 deletions.
Expand Up @@ -553,16 +553,14 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
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')) {
if (file_exists(dirname($r->getFilename()).'/../composer.json')) {
// with Symfony 2.4, the Security component was split into several subpackages
// and the translations have been moved to the symfony/security-core package
$dirs[] = dirname($r->getFilename()).'/../Resources/translations';
} else {
// in Symfony 2.3, translations are located in the symfony/security package
$translationsDir = $dir;
$dirs[] = dirname($r->getFilename()).'/../../Resources/translations';
}

$dirs[] = $translationsDir;
}
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 1ed07a0

Please sign in to comment.