while upgrading to symfony 6.1

This commit is contained in:
2022-10-28 18:48:25 +02:00
parent 433603fad2
commit e97f8e43bf
58 changed files with 1743 additions and 4656 deletions

View File

@@ -27,8 +27,9 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
use TargetPathTrait;
public function __construct(private readonly UserRepository $userRepository, private readonly RouterInterface $router)
{
}
{
// empty body
}
public function authenticate(Request $request): Passport
{
@@ -38,7 +39,8 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
$request->getSession()->set(name: Security::LAST_USERNAME, value: $username);
dd("here");
return new Passport(
userBadge: new UserBadge(userIdentifier: $username, userLoader: function ($userIdentifier) {
$user = $this->userRepository->findOneBy(['username' => $userIdentifier]);