You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Security] deprecate multiple providers in context listener
Passing multiple user providers to the context listener does not make
much sense. The listener is only responsible to refresh users for a
particular firewall. Thus, it must only be aware of the user provider
for this particular firewall.
thrownew \InvalidArgumentException('$contextKey must not be empty.');
51
59
}
52
60
61
+
if (is_array($userProviders)) {
62
+
@trigger_error(sprintf('Being able to pass multiple user providers to the constructor of %s is deprecated since version 3.3 and will not be supported anymore in 4.0. Only pass the user provider for the current firewall context instead.', __CLASS__), E_USER_DEPRECATED);
63
+
} else {
64
+
$userProviders = array($userProviders);
65
+
}
66
+
53
67
foreach ($userProvidersas$userProvider) {
54
68
if (!$userProviderinstanceof UserProviderInterface) {
55
69
thrownew \InvalidArgumentException(sprintf('User provider "%s" must implement "Symfony\Component\Security\Core\User\UserProviderInterface".', get_class($userProvider)));
0 commit comments