app.user_checker
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
index d9489abca1358..292154660b6dc 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1.yml
@@ -43,6 +43,7 @@ security:
firewalls:
simple: { pattern: /login, security: false }
secure:
+ provider: default
stateless: true
http_basic: true
form_login: true
@@ -56,6 +57,7 @@ security:
user_checker: ~
host:
+ provider: default
pattern: /test
host: foo\.example\.org
methods: [GET,POST]
@@ -64,6 +66,7 @@ security:
logout_on_user_change: true
with_user_checker:
+ provider: default
anonymous: ~
http_basic: ~
user_checker: app.user_checker
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_acl.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_acl.yml
index e8ed61ef031b9..176494e8ba93f 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_acl.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_acl.yml
@@ -44,6 +44,7 @@ security:
firewalls:
simple: { pattern: /login, security: false }
secure:
+ provider: default
stateless: true
http_basic: true
http_digest:
@@ -59,6 +60,7 @@ security:
user_checker: ~
host:
+ provider: default
pattern: /test
host: foo\.example\.org
methods: [GET,POST]
@@ -66,6 +68,7 @@ security:
http_basic: true
with_user_checker:
+ provider: default
anonymous: ~
http_basic: ~
user_checker: app.user_checker
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_digest.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_digest.yml
index a2b57201bfbd2..1e984256f33d1 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_digest.yml
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/container1_with_digest.yml
@@ -44,6 +44,7 @@ security:
firewalls:
simple: { pattern: /login, security: false }
secure:
+ provider: default
stateless: true
http_basic: true
http_digest:
@@ -59,6 +60,7 @@ security:
user_checker: ~
host:
+ provider: default
pattern: /test
host: foo\.example\.org
methods: [GET,POST]
@@ -67,6 +69,7 @@ security:
logout_on_user_change: true
with_user_checker:
+ provider: default
anonymous: ~
http_basic: ~
user_checker: app.user_checker
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
index 1055e4afd40f6..3dd1f817ae618 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/SecurityExtensionTest.php
@@ -148,6 +148,31 @@ public function testDeprecationForUserLogout()
$container->compile();
}
+ /**
+ * @group legacy
+ * @expectedDeprecation Firewall "default" has no "provider" set but multiple providers exist. Using the first configured provider (first) is deprecated since 3.4 and will throw an exception in 4.0, set the "provider" key on the firewall instead.
+ */
+ public function testDeprecationForAmbiguousProvider()
+ {
+ $container = $this->getRawContainer();
+
+ $container->loadFromExtension('security', array(
+ 'providers' => array(
+ 'first' => array('id' => 'foo'),
+ 'second' => array('id' => 'bar'),
+ ),
+
+ 'firewalls' => array(
+ 'default' => array(
+ 'http_basic' => null,
+ 'logout_on_user_change' => true,
+ ),
+ ),
+ ));
+
+ $container->compile();
+ }
+
protected function getRawContainer()
{
$container = new ContainerBuilder();
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