Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 1aac556

Browse files
Merge branch '2.8' into 3.4
* 2.8: Consistently throw exceptions on a single line fix fopen calls Update .editorconfig
2 parents 39b3194 + 8be9acf commit 1aac556

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

Guard/Firewall/GuardAuthenticationListener.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,7 @@ private function triggerRememberMe(GuardAuthenticatorInterface $guardAuthenticat
213213
}
214214

215215
if (!$response instanceof Response) {
216-
throw new \LogicException(sprintf(
217-
'%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.',
218-
\get_class($guardAuthenticator)
219-
));
216+
throw new \LogicException(sprintf('%s::onAuthenticationSuccess *must* return a Response if you want to use the remember me functionality. Return a Response, or set remember_me to false under the guard configuration.', \get_class($guardAuthenticator)));
220217
}
221218

222219
$this->rememberMeServices->loginSuccess($request, $response, $token);

Guard/GuardAuthenticatorHandler.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ public function handleAuthenticationSuccess(TokenInterface $token, Request $requ
8686
return $response;
8787
}
8888

89-
throw new \UnexpectedValueException(sprintf(
90-
'The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.',
91-
\get_class($guardAuthenticator),
92-
\is_object($response) ? \get_class($response) : \gettype($response)
93-
));
89+
throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null or a Response object. You returned %s.', \get_class($guardAuthenticator), \is_object($response) ? \get_class($response) : \gettype($response)));
9490
}
9591

9692
/**
@@ -134,11 +130,7 @@ public function handleAuthenticationFailure(AuthenticationException $authenticat
134130
return $response;
135131
}
136132

137-
throw new \UnexpectedValueException(sprintf(
138-
'The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.',
139-
\get_class($guardAuthenticator),
140-
\is_object($response) ? \get_class($response) : \gettype($response)
141-
));
133+
throw new \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null or a Response object. You returned %s.', \get_class($guardAuthenticator), \is_object($response) ? \get_class($response) : \gettype($response)));
142134
}
143135

144136
/**

0 commit comments

Comments
 (0)