8000 [HttpKernel] Fix missing import in GetResponseForExceptionEvent · libertjeremy/symfony@bc46a3a · GitHub
[go: up one dir, main page]

Skip to content

Commit bc46a3a

Browse files
fancywebnicolas-grekas
authored andcommitted
[HttpKernel] Fix missing import in GetResponseForExceptionEvent
1 parent 0b867be commit bc46a3a

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\HttpKernel\Event;
1313

14+
use Symfony\Component\Debug\Exception\FatalThrowableError;
1415
use Symfony\Component\HttpFoundation\Request;
1516
use Symfony\Component\HttpKernel\HttpKernelInterface;
1617

src/Symfony/Component/HttpKernel/EventListener/ErrorListener.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function onControllerArguments(ControllerArgumentsEvent $event)
106106
}
107107
}
108108

109-
public static function getSubscribedEvents()
109+
public static function getSubscribedEvents(): array
110110
{
111111
return [
112112
KernelEvents::CONTROLLER_ARGUMENTS => 'onControllerArguments',
@@ -119,11 +119,8 @@ public static function getSubscribedEvents()
119119

120120
/**
121121
* Logs an exception.
122-
*
123-
* @param \Exception $exception The \Exception instance
124-
* @param string $message The error message to log
125122
*/
126-
protected function logException(\Exception $exception, $message)
123+
protected function logException(\Throwable $exception, string $message): void
127124
{
128125
if (null !== $this->logger) {
129126
if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
@@ -136,10 +133,8 @@ protected function logException(\Exception $exception, $message)
136133

137134
/**
138135
* Clones the request for the exception.
139-
*
140-
* @return Request The cloned request
141136
*/
142-
protected function duplicateRequest(\Exception $exception, Request $request)
137+
protected function duplicateRequest(\Throwable $exception, Request $request): Request
143138
{
144139
$attributes = [
145140
'_controller' => $this->controller,

0 commit comments

Comments
 (0)
0