Skip to content

Commit c26cfcb

Browse files
committed
Merge branch '3.0'
* 3.0: (22 commits) [Yaml] Fix tests on PHP 7.0.2 [FrameworkBundle] Don't log twice with the error handler [2.7] Workaround https://bugs.php.net/63206 [2.3] Workaround https://bugs.php.net/63206 Add closing parenthesis [Serializer] Unset object_to_populate after using it Typo fix [WebProfiler] Fixed sf-minitoolbar height [HttpFoundation] Fixed Request HTTP_USER_AGENT on 3.X versions [2.3] Static Code Analysis for Components [Serializer] Use $context['cache_key'] to enhance caching Removed non-existent directory from composer autoload Fixed erroneous deprecation notice for extended Interfaces [Routing] cs fix Added support \IteratorAggregate for UniqueEntityValidator Update AbstractChoiceListTest.php [Serializer] Allow to use proxies in object_to_populate 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 ... Conflicts: src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php
2 parents af4e1fa + ef0a037 commit c26cfcb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ public function load(array $configs, ContainerBuilder $container)
137137
}
138138

139139
if ($container->getParameter('kernel.debug')) {
140+
$definition->replaceArgument(2, E_ALL & ~(E_COMPILE_ERROR | E_PARSE | E_ERROR | E_CORE_ERROR | E_RECOVERABLE_ERROR));
141+
140142
$loader->load('debug.xml');
141143

142144
$definition = $container->findDefinition('http_kernel');
@@ -148,7 +150,7 @@ public function load(array $configs, ContainerBuilder $container)
148150
$container->setDefinition('debug.event_dispatcher.parent', $definition);
149151
$container->setAlias('event_dispatcher', 'debug.event_dispatcher');
150152
} else {
151-
$definition->replaceArgument(2, E_COMPILE_ERROR | E_PARSE | E_ERROR | E_CORE_ERROR);
153+
$definition->replaceArgument(1, null);
152154
}
153155

154156
$this->addClassesToCompile(array(
@@ -664,24 +666,26 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
664666

665667
$dirs[] = dirname($r->getFileName()).'/../Resources/translations';
666668
}
667-
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
669+
$rootDir = $container->getParameter('kernel.root_dir');
668670
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
669671
$reflection = new \ReflectionClass($class);
670672
if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/translations')) {
671673
$dirs[] = $dir;
672674
}
673-
if (is_dir($dir = sprintf($overridePath, $bundle))) {
675+
if (is_dir($dir = $rootDir.sprintf('/Resources/%s/translations', $bundle))) {
674676
$dirs[] = $dir;
675677
}
676678
}
679+
677680
foreach ($config['paths'] as $dir) {
678681
if (is_dir($dir)) {
679682
$dirs[] = $dir;
680683
} else {
681684
throw new \UnexpectedValueException(sprintf('%s defined in translator.paths does not exist or is not a directory', $dir));
682685
}
683686
}
684-
if (is_dir($dir = $container->getParameter('kernel.root_dir').'/Resources/translations')) {
687+
688+
if (is_dir($dir = $rootDir.'/Resources/translations')) {
685689
$dirs[] = $dir;
686690
}
687691

0 commit comments

Comments
 (0)