Skip to content

Commit 521085e

Browse files
committed
Update the user checker to avoid trigger deprecations
This is technically a BC break for projects extending this class and overriding the method. However, there is no use case for extending this class instead of implementing the Symfony interface directly.
1 parent 139e608 commit 521085e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Security/UserChecker.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace FOS\UserBundle\Security;
1313

1414
use FOS\UserBundle\Model\UserInterface;
15+
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1516
use Symfony\Component\Security\Core\Exception\DisabledException;
1617
use Symfony\Component\Security\Core\User\UserCheckerInterface;
1718
use Symfony\Component\Security\Core\User\UserInterface as BaseUserInterface;
@@ -20,6 +21,8 @@
2021
* UserChecker checks the user account flags.
2122
*
2223
* @author Julian Finkler (Devtronic) <julian@developer-heaven.de>
24+
*
25+
* @final
2326
*/
2427
class UserChecker implements UserCheckerInterface
2528
{
@@ -32,7 +35,7 @@ public function checkPreAuth(BaseUserInterface $user): void
3235
}
3336
}
3437

35-
public function checkPostAuth(BaseUserInterface $user): void
38+
public function checkPostAuth(BaseUserInterface $user, ?TokenInterface $token = null): void
3639
{
3740
}
3841
}

0 commit comments

Comments
 (0)