Skip to content

Commit c4f3a45

Browse files
authored
Properly warn about deprecation of IS_AUTHENTICATED_ANONYMOUSLY
Right now i assumed that i just need to replace `IS_AUTHENTICATED_ANONYMOUSLY` with `IS_AUTHENTICATED, which is in fact `PUBLIC_ACCESS` not mentioned at all.
1 parent f69e4d6 commit c4f3a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authorization/Voter/AuthenticatedVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function vote(TokenInterface $token, $subject, array $attributes)
8686
&& ($this->authenticationTrustResolver->isAnonymous($token)
8787
|| $this->authenticationTrustResolver->isRememberMe($token)
8888
|| $this->authenticationTrustResolver->isFullFledged($token))) {
89-
trigger_deprecation('symfony/security-core', '5.4', 'The "IS_AUTHENTICATED_ANONYMOUSLY" security attribute is deprecated, use "IS_AUTHENTICATED" or "IS_AUTHENTICATED_FULLY" instead if you want to check if the request is (fully) authenticated.');
89+
trigger_deprecation('symfony/security-core', '5.4', 'The "IS_AUTHENTICATED_ANONYMOUSLY" security attribute is deprecated, use "PUBLIC_ACCESS" for public resources, otherwise use "IS_AUTHENTICATED" or "IS_AUTHENTICATED_FULLY" instead if you want to check if the request is (fully) authenticated.');
9090

9191
return VoterInterface::ACCESS_GRANTED;
9292
}

0 commit comments

Comments
 (0)