Skip to content

Commit

Permalink
Merge branch '5.0' into 5.1
Browse files Browse the repository at this point in the history
* 5.0:
  Fix abstract method name in PHP doc block
  Various cleanups
  [HttpClient] fix issues in tests
  Fixes sprintf(): Too few arguments in form transformer
  [Console] Fix QuestionHelper::disableStty()
  [Validator] Use Mime component to determine mime type for file validator
  validate subforms in all validation groups
  Update Hungarian translations
  Add meaningful message when Process is not installed (ProcessHelper)
  [PropertyAccess] Fix TypeError parsing again.
  [TwigBridge] fix fallback html-to-txt body converter
  [Security/Http] fix merge
  [ErrorHandler] fix setting $trace to null in FatalError
  [Form] add missing Czech validators translation
  [Validator] add missing Czech translations
  never directly validate Existence (Required/Optional) constraints
  • Loading branch information
nicolas-grekas committed May 30, 2020
2 parents 932d473 + e18913e commit 6a785d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Firewall/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private function handleAccessDeniedException(ExceptionEvent $event, AccessDenied

private function handleLogoutException(ExceptionEvent $event, LogoutException $exception): void
{
$event->setException(new AccessDeniedHttpException($exception->getMessage(), $exception));
$event->setThrowable(new AccessDeniedHttpException($exception->getMessage(), $exception));

if (null !== $this->logger) {
$this->logger->info('A LogoutException was thrown; wrapping with AccessDeniedHttpException', ['exception' => $exception]);
Expand Down
4 changes: 2 additions & 2 deletions Tests/Firewall/ExceptionListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ public function testLogoutException()
$listener = $this->createExceptionListener();
$listener->onKernelException($event);

$this->assertEquals('Invalid CSRF.', $event->getException()->getMessage());
$this->assertEquals(403, $event->getException()->getStatusCode());
$this->assertEquals('Invalid CSRF.', $event->getThrowable()->getMessage());
$this->assertEquals(403, $event->getThrowable()->getStatusCode());
}

public function getAccessDeniedExceptionProvider()
Expand Down

0 comments on commit 6a785d9

Please sign in to comment.