From 6fd21ce5aa8679f900e1ad059c78967cd83e79c9 Mon Sep 17 00:00:00 2001 From: Simon Heimberg Date: Fri, 9 Apr 2021 13:10:44 +0300 Subject: [PATCH] allow null for framework.translator.default_path Allow to configure framework.translator.default_path to null, as it was until symfony 3.4.x (fix BC compatibility). fixes #37111 --- .../DependencyInjection/FrameworkExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 972c8f255f2d6..814e54042cd6e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -1213,7 +1213,9 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder $container->getDefinition('console.command.translation_update')->replaceArgument(6, $transPaths); } - if ($container->fileExists($defaultDir)) { + if (null === $defaultDir) { + // allow null + } elseif ($container->fileExists($defaultDir)) { $dirs[] = $defaultDir; } else { $nonExistingDirs[] = $defaultDir;