Skip to content

Conversation

@lacatoire
Copy link

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

@carsonbot carsonbot added this to the 7.3 milestone Dec 2, 2025
@carsonbot carsonbot changed the title Fix incorrect checkPostAuth() signature in UserChecker documentation Fix incorrect checkPostAuth() signature in UserChecker documentation Dec 2, 2025
@carsonbot carsonbot changed the title Fix incorrect checkPostAuth() signature in UserChecker documentation [Security] Fix incorrect checkPostAuth() signature in UserChecker documentation Dec 2, 2025
@javiereguiluz
Copy link
Member

It's tre. You can check this here: https://github.com/symfony/symfony/blob/7.3/src/Symfony/Component/Security/Core/User/UserCheckerInterface.php

Thanks Louis-Arnaud for fixing this issue and for perfectly explaining the issue.

@javiereguiluz javiereguiluz merged commit f7c9a76 into symfony:7.3 Dec 2, 2025
2 of 3 checks passed
@lacatoire lacatoire deleted the fix/userchecker-doc-signature branch December 2, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants