composer update
This commit is contained in:
@@ -22,6 +22,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* controller.
|
||||
*
|
||||
* @author Christophe Coevoet <stof@notk.org>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ControllerArgumentsEvent extends FilterControllerArgumentsEvent
|
||||
{
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* Controllers should be callables.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ControllerEvent extends FilterControllerEvent
|
||||
{
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* event.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ExceptionEvent extends GetResponseForExceptionEvent
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
/**
|
||||
* @deprecated since Symfony 4.3, use ControllerArgumentsEvent instead
|
||||
*/
|
||||
class FilterControllerArgumentsEvent extends ControllerEvent
|
||||
class FilterControllerArgumentsEvent extends FilterControllerEvent
|
||||
{
|
||||
private $arguments;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* Triggered whenever a request is fully processed.
|
||||
*
|
||||
* @author Benjamin Eberlei <kontakt@beberlei.de>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class FinishRequestEvent extends KernelEvent
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Event;
|
||||
|
||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
|
||||
@@ -19,45 +20,55 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
*/
|
||||
class GetResponseForExceptionEvent extends RequestEvent
|
||||
{
|
||||
/**
|
||||
* The exception object.
|
||||
*
|
||||
* @var \Exception
|
||||
*/
|
||||
private $throwable;
|
||||
private $exception;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $allowCustomResponseCode = false;
|
||||
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Exception $e)
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Throwable $e)
|
||||
{
|
||||
parent::__construct($kernel, $request, $requestType);
|
||||
|
||||
$this->setException($e);
|
||||
$this->setThrowable($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the thrown exception.
|
||||
*
|
||||
* @return \Exception The thrown exception
|
||||
*/
|
||||
public function getException()
|
||||
public function getThrowable(): \Throwable
|
||||
{
|
||||
return $this->exception;
|
||||
return $this->throwable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the thrown exception.
|
||||
*
|
||||
* This exception will be thrown if no response is set in the event.
|
||||
*/
|
||||
public function setThrowable(\Throwable $exception): void
|
||||
{
|
||||
$this->exception = null;
|
||||
$this->throwable = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Symfony 4.4, use getThrowable instead
|
||||
*
|
||||
* @return \Exception The thrown exception
|
||||
*/
|
||||
public function getException()
|
||||
{
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, use "getThrowable()" instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return $this->exception ?? $this->exception = $this->throwable instanceof \Exception ? $this->throwable : new FatalThrowableError($this->throwable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Symfony 4.4, use setThrowable instead
|
||||
*
|
||||
* @param \Exception $exception The thrown exception
|
||||
*/
|
||||
public function setException(\Exception $exception)
|
||||
{
|
||||
$this->exception = $exception;
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, use "setThrowable()" instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
$this->throwable = $this->exception = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,10 +27,8 @@ class KernelEvent extends Event
|
||||
private $requestType;
|
||||
|
||||
/**
|
||||
* @param HttpKernelInterface $kernel The kernel in which this event was thrown
|
||||
* @param Request $request The request the kernel is currently processing
|
||||
* @param int $requestType The request type the kernel is currently processing; one of
|
||||
* HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST
|
||||
* @param int $requestType The request type the kernel is currently processing; one of
|
||||
* HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST
|
||||
*/
|
||||
public function __construct(HttpKernelInterface $kernel, Request $request, ?int $requestType)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* browser.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ResponseEvent extends FilterResponseEvent
|
||||
{
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* will always return the value of `HttpKernelInterface::MASTER_REQUEST`.
|
||||
*
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class TerminateEvent extends PostResponseEvent
|
||||
{
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace Symfony\Component\HttpKernel\Event;
|
||||
* response is set.
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ViewEvent extends GetResponseForControllerResultEvent
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user