diff --git a/src/Symfony/Bundle/SecurityBundle/CacheWarmer/ExpressionCacheWarmer.php b/src/Symfony/Bundle/SecurityBundle/CacheWarmer/ExpressionCacheWarmer.php index d50f710d53038..095286e66538a 100644 --- a/src/Symfony/Bundle/SecurityBundle/CacheWarmer/ExpressionCacheWarmer.php +++ b/src/Symfony/Bundle/SecurityBundle/CacheWarmer/ExpressionCacheWarmer.php @@ -21,7 +21,7 @@ class ExpressionCacheWarmer implements CacheWarmerInterface private $expressionLanguage; /** - * @param iterable $expressions + * @param iterable $expressions */ public function __construct(iterable $expressions, ExpressionLanguage $expressionLanguage) { diff --git a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php index 76a5548d0622d..d7960d480a5d9 100644 --- a/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/src/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -19,10 +19,11 @@ class RoleHierarchy implements RoleHierarchyInterface { private $hierarchy; + /** @var array> */ protected $map; /** - * @param array $hierarchy An array defining the hierarchy + * @param array> $hierarchy */ public function __construct(array $hierarchy) { diff --git a/src/Symfony/Component/Security/Core/User/ChainUserProvider.php b/src/Symfony/Component/Security/Core/User/ChainUserProvider.php index bcea41d0db860..148b239f1147c 100644 --- a/src/Symfony/Component/Security/Core/User/ChainUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/ChainUserProvider.php @@ -27,7 +27,7 @@ class ChainUserProvider implements UserProviderInterface, PasswordUpgraderInterf private $providers; /** - * @param iterable $providers + * @param iterable $providers */ public function __construct(iterable $providers) { diff --git a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php index d077939471aa5..6b0b41d39157e 100644 --- a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php @@ -24,13 +24,16 @@ */ class InMemoryUserProvider implements UserProviderInterface { + /** + * @var array + */ private $users; /** * The user array is a hash where the keys are usernames and the values are * an array of attributes: 'password', 'enabled', and 'roles'. * - * @param array $users An array of users + * @param array}> $users An array of users */ public function __construct(array $users = []) { diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php index c502d026137ab..0e2a653ddfa1b 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticatorManager.php @@ -55,7 +55,7 @@ class AuthenticatorManager implements AuthenticatorManagerInterface, UserAuthent private $requiredBadges; /** - * @param AuthenticatorInterface[] $authenticators + * @param iterable $authenticators */ public function __construct(iterable $authenticators, TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher, string $firewallName, LoggerInterface $logger = null, bool $eraseCredentials = true, bool $hideUserNotFoundExceptions = true, array $requiredBadges = []) { diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php b/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php index ac45e25c320b6..296f60c3ed832 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php @@ -29,7 +29,10 @@ class LogoutUrlGenerator private $router; private $tokenStorage; private $listeners = []; - private $currentFirewall; + /** @var string|null */ + private $currentFirewallName; + /** @var string|null */ + private $currentFirewallContext; public function __construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) { @@ -74,7 +77,8 @@ public function getLogoutUrl(string $key = null) public function setCurrentFirewall(?string $key, string $context = null) { - $this->currentFirewall = [$key, $context]; + $this->currentFirewallName = $key; + $this->currentFirewallContext = $context; } /** @@ -130,7 +134,7 @@ private function getListener(?string $key): array if (null !== $this->tokenStorage) { $token = $this->tokenStorage->getToken(); - // @deprecated since 5.4 + // @deprecated since Symfony 5.4 if ($token instanceof AnonymousToken) { throw new \InvalidArgumentException('Unable to generate a logout url for an anonymous token.'); } @@ -151,14 +155,12 @@ private function getListener(?string $key): array } // Fetch from injected current firewall information, if possible - [$key, $context] = $this->currentFirewall; - - if (isset($this->listeners[$key])) { - return $this->listeners[$key]; + if (isset($this->listeners[$this->currentFirewallName])) { + return $this->listeners[$this->currentFirewallName]; } foreach ($this->listeners as $listener) { - if (isset($listener[4]) && $context === $listener[4]) { + if (isset($listener[4]) && $this->currentFirewallContext === $listener[4]) { return $listener; } }