Skip to content

Commit dd4ff65

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: Typo fix [WebProfiler] Fixed sf-minitoolbar height [2.3] Static Code Analysis for Components [Serializer] Use $context['cache_key'] to enhance caching Fixed erroneous deprecation notice for extended Interfaces [Routing] cs fix Added support \IteratorAggregate for UniqueEntityValidator Update AbstractChoiceListTest.php Fix #17306 Paths with % in it are note allowed (like urlencoded) Use proper class to fetch $versionStrategy property Added sort order SORT_STRING for params in UriSigner Remove normalizer cache in Serializer class [Serializer] ObjectNormalizer: context can contain not serializable data
2 parents 9a670a5 + a58697f commit dd4ff65

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,24 +664,26 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
664664

665665
$dirs[] = dirname($r->getFileName()).'/../Resources/translations';
666666
}
667-
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
667+
$rootDir = $container->getParameter('kernel.root_dir');
668668
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
669669
$reflection = new \ReflectionClass($class);
670670
if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/translations')) {
671671
$dirs[] = $dir;
672672
}
673-
if (is_dir($dir = sprintf($overridePath, $bundle))) {
673+
if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $bundle))) {
674674
$dirs[] = $dir;
675675
}
676676
}
677+
677678
foreach ($config['paths'] as $dir) {
678679
if (is_dir($dir)) {
679680
$dirs[] = $dir;
680681
} else {
681682
throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory', $dir));
682683
}
683684
}
684-
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) {
685+
686+
if (is_dir($dir = $rootDir.'/Resources/translations')) {
685687
$dirs[] = $dir;
686688
}
687689

0 commit comments

Comments
 (0)