Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a34e7d

Browse filesBrowse files
committed
[Security] Lazy load request matchers
1 parent bcf8b68 commit 8a34e7d
Copy full SHA for 8a34e7d

File tree

Expand file treeCollapse file tree

3 files changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
2121
use Symfony\Component\DependencyInjection\ContainerBuilder;
2222
use Symfony\Component\DependencyInjection\Reference;
23+
use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
2324
use Symfony\Component\Config\FileLocator;
2425
use Symfony\Component\Security\Core\Authorization\ExpressionLanguage;
2526

@@ -255,7 +256,7 @@ private function createFirewalls($config, ContainerBuilder $container)
255256

256257
$map[$contextId] = $matcher;
257258
}
258-
$mapDef->replaceArgument(1, $map);
259+
$mapDef->replaceArgument(1, new IteratorArgument($map));
259260

260261
// add authentication providers to authentication manager
261262
$authenticationProviders = array_map(function ($id) {

‎src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class FirewallMap implements FirewallMapInterface
2828
protected $map;
2929
private $contexts;
3030

31-
public function __construct(ContainerInterface $container, array $map)
31+
public function __construct(ContainerInterface $container, $map)
3232
{
3333
$this->container = $container;
3434
$this->map = $map;

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testFirewalls()
6868
$arguments = $container->getDefinition('security.firewall.map')->getArguments();
6969
$listeners = array();
7070
$configs = array();
71-
foreach (array_keys($arguments[1]) as $contextId) {
71+
foreach (array_keys($arguments[1]->getValues()) as $contextId) {
7272
$contextDef = $container->getDefinition($contextId);
7373
$arguments = $contextDef->getArguments();
7474
$listeners[] = array_map(function ($ref) { return (string) $ref; }, $arguments['index_0']);
@@ -180,7 +180,7 @@ public function testFirewallRequestMatchers()
180180
$arguments = $container->getDefinition('security.firewall.map')->getArguments();
181181
$matchers = array();
182182

183-
foreach ($arguments[1] as $reference) {
183+
foreach ($arguments[1]->getValues() as $reference) {
184184
if ($reference instanceof Reference) {
185185
$definition = $container->getDefinition((string) $reference);
186186
$matchers[] = $definition->getArguments();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.