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
if (null !== $anonymousClass && !is_a($anonymousClass, AnonymousToken::class, true)) {
34
+
@trigger_error(sprintf('Configuring a custom anonymous token class is deprecated since Symfony 4.2; have the "%s" class extend the "%s" class instead, and remove the "%s" constructor argument.', $anonymousClass, AnonymousToken::class, self::class), E_USER_DEPRECATED);
35
+
}
36
+
37
+
if (null !== $rememberMeClass && !is_a($rememberMeClass, RememberMeToken::class, true)) {
38
+
@trigger_error(sprintf('Configuring a custom remember me token class is deprecated since Symfony 4.2; have the "%s" class extend the "%s" class instead, and remove the "%s" constructor argument.', $rememberMeClass, RememberMeToken::class, self::class), E_USER_DEPRECATED);
39
+
}
30
40
}
31
41
32
42
/**
@@ -38,7 +48,11 @@ public function isAnonymous(TokenInterface $token = null)
38
48
returnfalse;
39
49
}
40
50
41
-
return$tokeninstanceof$this->anonymousClass;
51
+
if (null !== $this->anonymousClass) {
52
+
return$tokeninstanceof$this->anonymousClass;
53
+
}
54
+
55
+
return$tokeninstanceof AnonymousToken;
42
56
}
43
57
44
58
/**
@@ -50,7 +64,11 @@ public function isRememberMe(TokenInterface $token = null)
* @expectedDeprecation Configuring a custom anonymous token class is deprecated since Symfony 4.2; have the "Symfony\Component\Security\Core\Tests\Authentication\FakeCustomToken" class extend the "Symfony\Component\Security\Core\Authentication\Token\AnonymousToken" class instead, and remove the "Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" constructor argument.
* @expectedDeprecation Configuring a custom remember me token class is deprecated since Symfony 4.2; have the "Symfony\Component\Security\Core\Tests\Authentication\FakeCustomToken" class extend the "Symfony\Component\Security\Core\Authentication\Token\RememberMeToken" class instead, and remove the "Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" constructor argument.
* @expectedDeprecation Configuring a custom remember me token class is deprecated since Symfony 4.2; have the "Symfony\Component\Security\Core\Tests\Authentication\FakeCustomToken" class extend the "Symfony\Component\Security\Core\Authentication\Token\RememberMeToken" class instead, and remove the "Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver" constructor argument.
0 commit comments