8000 Merge branch '4.4' into 5.1 · symfony/security-guard@d1e048b · GitHub
[go: up one dir, main page]

Skip to content

Commit d1e048b

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [HttpFoundation] Drop int return type from parseFilesize() Added $translator->addLoader() bug symfony/symfony#39878 [doctrine-bridge] Add username to UserNameNotFoundException fix spelling Add check for constant in Curl client Revert #38614, add assert to avoid regression Fix problem when SYMFONY_PHPUNIT_VERSION is empty string value Update PHP CS Fixer config to v2.18
2 parents 9b0abb1 + 6934747 commit d1e048b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Provider/GuardAuthenticationProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator
105105
$user = $guardAuthenticator->getUser($token->getCredentials(), $this->userProvider);
106106

107107
if (null === $user) {
108-
throw new UsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
108+
$e = new UsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
109+
$e->setUsername($token->getUsername());
110+
111+
throw $e;
109112
}
110113

111114
if (!$user instanceof UserInterface) {

0 commit comments

Comments
 (0)
0