composer update
This commit is contained in:
@@ -19,11 +19,11 @@ class AccessDeniedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(403, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ class BadRequestHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(400, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ class ConflictHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(409, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -67,9 +67,15 @@ class ControllerDoesNotReturnResponseException extends \LogicException
|
||||
if (\is_object($controller)) {
|
||||
$r = new \ReflectionClass($controller);
|
||||
|
||||
try {
|
||||
$line = $r->getMethod('__invoke')->getEndLine();
|
||||
} catch (\ReflectionException $e) {
|
||||
$line = $r->getEndLine();
|
||||
}
|
||||
|
||||
return [
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getEndLine(),
|
||||
'line' => $line,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ class GoneHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(410, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface
|
||||
private $statusCode;
|
||||
private $headers;
|
||||
|
||||
public function __construct(int $statusCode, string $message = null, \Exception $previous = null, array $headers = [], ?int $code = 0)
|
||||
public function __construct(int $statusCode, string $message = null, \Throwable $previous = null, array $headers = [], ?int $code = 0)
|
||||
{
|
||||
$this->statusCode = $statusCode;
|
||||
$this->headers = $headers;
|
||||
|
||||
@@ -18,11 +18,11 @@ class LengthRequiredHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(411, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ class MethodNotAllowedHttpException extends HttpException
|
||||
/**
|
||||
* @param array $allow An array of allowed methods
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(array $allow, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct(array $allow, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
$headers['Allow'] = strtoupper(implode(', ', $allow));
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ class NotAcceptableHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(406, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ class NotFoundHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(404, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ class PreconditionFailedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(412, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ class PreconditionRequiredHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(428, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ class ServiceUnavailableHttpException extends HttpException
|
||||
/**
|
||||
* @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if ($retryAfter) {
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
|
||||
@@ -21,11 +21,11 @@ class TooManyRequestsHttpException extends HttpException
|
||||
/**
|
||||
* @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct($retryAfter = null, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if ($retryAfter) {
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
|
||||
@@ -19,11 +19,11 @@ class UnauthorizedHttpException extends HttpException
|
||||
/**
|
||||
* @param string $challenge WWW-Authenticate challenge string
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $challenge, string $message = null, \Exception $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct(string $challenge, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
$headers['WWW-Authenticate'] = $challenge;
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ class UnprocessableEntityHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(422, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,11 @@ class UnsupportedMediaTypeHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Exception $previous The previous exception
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
*/
|
||||
public function __construct(string $message = null, \Exception $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
parent::__construct(415, $message, $previous, $headers, $code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user