8000 Lazy load security listeners · symfony/symfony@f3bbf31 · GitHub
[go: up one dir, main page]

Skip to content

Commit f3bbf31

Browse files
committed
Lazy load security listeners
1 parent 99573dc commit f3bbf31

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private function createFirewalls($config, ContainerBuilder $container)
265265
$contextId = 'security.firewall.map.context.'.$name;
266266
$context = $container->setDefinition($contextId, new ChildDefinition('security.firewall.context'));
267267
$context
268-
->replaceArgument(0, $listeners)
268+
->replaceArgument(0, new IteratorArgument($listeners))
269269
->replaceArgument(1, $exceptionListener)
270270
->replaceArgument(2, new Reference($configId))
271271
;

src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FirewallContext
2525
private $exceptionListener;
2626
private $config;
2727

28-
public function __construct(array $listeners, ExceptionListener $exceptionListener = null, FirewallConfig $config = null)
28+
public function __construct(/* iterable */ $listeners, ExceptionListener $exceptionListener = null, FirewallConfig $config = null)
2929
{
3030
$this->listeners = $listeners;
3131
$this->exceptionListener = $exceptionListener;

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testFirewalls()
7272
foreach (array_keys($arguments[1]->getValues()) as $contextId) {
7373
$contextDef = $container->getDefinition($contextId);
7474
$arguments = $contextDef->getArguments();
75-
$listeners[] = array_map('strval', $arguments['index_0']);
75+
$listeners[] = array_map('strval', $arguments['index_0']->getValues());
7676

7777
$configDef = $container->getDefinition((string) $arguments['index_2']);
7878
$configs[] = array_values($configDef->getArguments());

0 commit comments

Comments
 (0)
0