summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-03-26 13:47:28 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2015-03-26 13:47:28 +0100
commitdcb1880d23868a6f9934a87bb6766d4002b484a3 (patch)
treedc59dc73d516d4e6fb0f50936275e4a667a520ce /Core/Authentication
parent48526dc543e7776f2f4ac3f22d65a27cc3b7d911 (diff)
parenta6bb27a476fd41db01c9db5a076afdcbe416e893 (diff)
downloadsymfony-security-dcb1880d23868a6f9934a87bb6766d4002b484a3.zip
symfony-security-dcb1880d23868a6f9934a87bb6766d4002b484a3.tar.gz
symfony-security-dcb1880d23868a6f9934a87bb6766d4002b484a3.tar.bz2
minor #13482 Implemented check on interface implementation (jaytaph)
This PR was squashed before being merged into the 2.7 branch (closes #13482). Discussion ---------- Implemented check on interface implementation | Q | A | ------------- | --- | Bug fix? | Yes | New feature? | No | BC breaks? | No | Deprecations? | No | Tests pass? | Yes | Fixed tickets | #13480 | License | MIT | Doc PR | Commits ------- 2a79ace Implemented check on interface implementation
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/AuthenticationProviderManager.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Core/Authentication/AuthenticationProviderManager.php b/Core/Authentication/AuthenticationProviderManager.php
index f713e8f..16de8da 100644
--- a/Core/Authentication/AuthenticationProviderManager.php
+++ b/Core/Authentication/AuthenticationProviderManager.php
@@ -48,6 +48,12 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface
throw new \InvalidArgumentException('You must at least add one authentication provider.');
}
+ foreach ($providers as $provider) {
+ if (!$provider instanceof AuthenticationProviderInterface) {
+ throw new \InvalidArgumentException(sprintf('Provider "%s" must implement the AuthenticationProviderInterface.', get_class($provider)));
+ }
+ }
+
$this->providers = $providers;
$this->eraseCredentials = (bool) $eraseCredentials;
}