Skip to content

Commit f7c9a76

Browse files
committed
minor #21618 [Security] Fix incorrect checkPostAuth() signature in UserChecker documentation (lacatoire)
This PR was merged into the 7.3 branch. Discussion ---------- [Security] Fix incorrect checkPostAuth() signature in UserChecker documentation The documentation for `UserChecker::checkPostAuth()` currently shows the following signature: `public function checkPostAuth(UserInterface $user, TokenInterface $token): void` This is incorrect for Symfony 7.3, where the $token argument is: - nullable - optional and handled internally via func_get_arg() for backward compatibility The correct signature for 7.3 should be: `public function checkPostAuth(UserInterface $user, ?TokenInterface $token = null): void` Commits ------- ff2b5c8 Fix UserChecker doc: make $token nullable and optional in checkPostAuth()
2 parents 59c10ac + ff2b5c8 commit f7c9a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/user_checkers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ displayed to the user::
4242
}
4343
}
4444

45-
public function checkPostAuth(UserInterface $user, TokenInterface $token): void
45+
public function checkPostAuth(UserInterface $user, ?TokenInterface $token = null): void
4646
{
4747
if (!$user instanceof AppUser) {
4848
return;

0 commit comments

Comments
 (0)