Open xabbuh opened 1 month ago
Hello,
You can add the import of TokenInterface
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
I think we can add a notice version :
.. versionadded:: 7.2
The token argument for checkPostAuth function was introduced in Symfony 7.2.
And maybe an example of usage in function :
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
if (!\in_array('foo', $token->getRoleNames())) {
throw new AccessDeniedException('...');
}
fixes #20062