Skip to content

Commit e263a9d

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Fix quotes in exception messages Fix quotes in exception messages Fix quotes in exception messages
2 parents 25707fb + a49d799 commit e263a9d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Firewall/ExceptionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ private function startAuthentication(Request $request, AuthenticationException $
216216
if (!$response instanceof Response) {
217217
$given = \is_object($response) ? \get_class($response) : \gettype($response);
218218

219-
throw new \LogicException(sprintf('The %s::start() method must return a Response object (%s returned).', \get_class($this->authenticationEntryPoint), $given));
219+
throw new \LogicException(sprintf('The "%s::start()" method must return a Response object ("%s" returned).', \get_class($this->authenticationEntryPoint), $given));
220220
}
221221

222222
return $response;

Firewall/RemoteUserAuthenticationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM
4141
protected function getPreAuthenticatedData(Request $request)
4242
{
4343
if (!$request->server->has($this->userKey)) {
44-
throw new BadCredentialsException(sprintf('User key was not found: %s.', $this->userKey));
44+
throw new BadCredentialsException(sprintf('User key was not found: "%s".', $this->userKey));
4545
}
4646

4747
return [$request->server->get($this->userKey), null];

Firewall/X509AuthenticationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function getPreAuthenticatedData(Request $request)
5252
}
5353

5454
if (null === $user) {
55-
throw new BadCredentialsException(sprintf('SSL credentials not found: %s, %s.', $this->userKey, $this->credentialKey));
55+
throw new BadCredentialsException(sprintf('SSL credentials not found: "%s", "%s".', $this->userKey, $this->credentialKey));
5656
}
5757

5858
return [$user, $request->server->get($this->credentialKey, '')];

Tests/Firewall/ExceptionListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function testExceptionWhenEntryPointReturnsBadValue()
8383
$listener->onKernelException($event);
8484
// the exception has been replaced by our LogicException
8585
$this->assertInstanceOf('LogicException', $event->getThrowable());
86-
$this->assertStringEndsWith('start() method must return a Response object (string returned).', $event->getThrowable()->getMessage());
86+
$this->assertStringEndsWith('start()" method must return a Response object ("string" returned).', $event->getThrowable()->getMessage());
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)