Skip to content

Commit d131937

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [FrameworkBundle] Return early
2 parents 1cec4a5 + cbc7c5d commit d131937

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,31 +1016,33 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
10161016
->replaceArgument(0, $config['default_uri']);
10171017
}
10181018

1019-
if (\PHP_VERSION_ID >= 80000 || $this->annotationsConfigEnabled) {
1020-
$container->register('routing.loader.annotation', AnnotatedRouteControllerLoader::class)
1021-
->setPublic(false)
1022-
->addTag('routing.loader', ['priority' => -10])
1023-
->setArguments([
1024-
new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE),
1025-
'%kernel.environment%',
1026-
]);
1019+
if (\PHP_VERSION_ID < 80000 && !$this->annotationsConfigEnabled) {
1020+
return;
1021+
}
10271022

1028-
$container->register('routing.loader.annotation.directory', AnnotationDirectoryLoader::class)
1029-
->setPublic(false)
1030-
->addTag('routing.loader', ['priority' => -10])
1031-
->setArguments([
1032-
new Reference('file_locator'),
1033-
new Reference('routing.loader.annotation'),
1034-
]);
1023+
$container->register('routing.loader.annotation', AnnotatedRouteControllerLoader::class)
1024+
->setPublic(false)
1025+
->addTag('routing.loader', ['priority' => -10])
1026+
->setArguments([
1027+
new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE),
1028+
'%kernel.environment%',
1029+
]);
10351030

1036-
$container->register('routing.loader.annotation.file', AnnotationFileLoader::class)
1037-
->setPublic(false)
1038-
->addTag('routing.loader', ['priority' => -10])
1039-
->setArguments([
1040-
new Reference('file_locator'),
1041-
new Reference('routing.loader.annotation'),
1042-
]);
1043-
}
1031+
$container->register('routing.loader.annotation.directory', AnnotationDirectoryLoader::class)
1032+
->setPublic(false)
1033+
->addTag('routing.loader', ['priority' => -10])
1034+
->setArguments([
1035+
new Reference('file_locator'),
1036+
new Reference('routing.loader.annotation'),
1037+
]);
1038+
1039+
$container->register('routing.loader.annotation.file', AnnotationFileLoader::class)
1040+
->setPublic(false)
1041+
->addTag('routing.loader', ['priority' => -10])
1042+
->setArguments([
1043+
new Reference('file_locator'),
1044+
new Reference('routing.loader.annotation'),
1045+
]);
10441046
}
10451047

10461048
private function registerSessionConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy