bug #34326 [HttpKernel] Fix missing import in GetResponseForExceptionEvent (fancyweb)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Fix missing import in GetResponseForExceptionEvent
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
bc46a3a6dd
[HttpKernel] Fix missing import in GetResponseForExceptionEvent
This commit is contained in:
commit
a90352263c
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\HttpKernel\Event;
|
namespace Symfony\Component\HttpKernel\Event;
|
||||||
|
|
||||||
|
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class ErrorListener implements EventSubscriberInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getSubscribedEvents()
|
public static function getSubscribedEvents(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
KernelEvents::CONTROLLER_ARGUMENTS => 'onControllerArguments',
|
KernelEvents::CONTROLLER_ARGUMENTS => 'onControllerArguments',
|
||||||
@ -119,11 +119,8 @@ class ErrorListener implements EventSubscriberInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs an exception.
|
* Logs an exception.
|
||||||
*
|
|
||||||
* @param \Exception $exception The \Exception instance
|
|
||||||
* @param string $message The error message to log
|
|
||||||
*/
|
*/
|
||||||
protected function logException(\Exception $exception, $message)
|
protected function logException(\Throwable $exception, string $message): void
|
||||||
{
|
{
|
||||||
if (null !== $this->logger) {
|
if (null !== $this->logger) {
|
||||||
if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
|
if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
|
||||||
@ -136,10 +133,8 @@ class ErrorListener implements EventSubscriberInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clones the request for the exception.
|
* Clones the request for the exception.
|
||||||
*
|
|
||||||
* @return Request The cloned request
|
|
||||||
*/
|
*/
|
||||||
protected function duplicateRequest(\Exception $exception, Request $request)
|
protected function duplicateRequest(\Throwable $exception, Request $request): Request
|
||||||
{
|
{
|
||||||
$attributes = [
|
$attributes = [
|
||||||
'_controller' => $this->controller,
|
'_controller' => $this->controller,
|
||||||
|
Reference in New Issue
Block a user