mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-02 04:59:49 +09:00
Update to laravel 7
This commit is contained in:
@@ -18,13 +18,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class AccessDeniedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(403, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class BadRequestHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(400, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class ConflictHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(409, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class ControllerDoesNotReturnResponseException extends \LogicException
|
||||
|
||||
private function parseControllerDefinition(callable $controller): ?array
|
||||
{
|
||||
if (\is_string($controller) && false !== strpos($controller, '::')) {
|
||||
if (\is_string($controller) && str_contains($controller, '::')) {
|
||||
$controller = explode('::', $controller);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class GoneHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(410, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,19 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface
|
||||
private $statusCode;
|
||||
private $headers;
|
||||
|
||||
public function __construct(int $statusCode, string $message = null, \Throwable $previous = null, array $headers = [], ?int $code = 0)
|
||||
public function __construct(int $statusCode, ?string $message = '', \Throwable $previous = null, array $headers = [], ?int $code = 0)
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
if (null === $code) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__);
|
||||
|
||||
$code = 0;
|
||||
}
|
||||
|
||||
$this->statusCode = $statusCode;
|
||||
$this->headers = $headers;
|
||||
|
||||
|
||||
@@ -16,19 +16,19 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
*
|
||||
* @author Kris Wallsmith <kris@symfony.com>
|
||||
*/
|
||||
interface HttpExceptionInterface
|
||||
interface HttpExceptionInterface extends \Throwable
|
||||
{
|
||||
/**
|
||||
* Returns the status code.
|
||||
*
|
||||
* @return int An HTTP response status code
|
||||
* @return int
|
||||
*/
|
||||
public function getStatusCode();
|
||||
|
||||
/**
|
||||
* Returns response headers.
|
||||
*
|
||||
* @return array Response headers
|
||||
* @return array
|
||||
*/
|
||||
public function getHeaders();
|
||||
}
|
||||
|
||||
16
vendor/symfony/http-kernel/Exception/InvalidMetadataException.php
vendored
Normal file
16
vendor/symfony/http-kernel/Exception/InvalidMetadataException.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Exception;
|
||||
|
||||
class InvalidMetadataException extends \LogicException
|
||||
{
|
||||
}
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class LengthRequiredHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(411, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,24 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class MethodNotAllowedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param array $allow An array of allowed methods
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string[] $allow An array of allowed methods
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int|null $code The internal exception code
|
||||
*/
|
||||
public function __construct(array $allow, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct(array $allow, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
if (null === $code) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__);
|
||||
|
||||
$code = 0;
|
||||
}
|
||||
|
||||
$headers['Allow'] = strtoupper(implode(', ', $allow));
|
||||
|
||||
parent::__construct(405, $message, $previous, $headers, $code);
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class NotAcceptableHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(406, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class NotFoundHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(404, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class PreconditionFailedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(412, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class PreconditionRequiredHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(428, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,24 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
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 \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int|null $code The internal exception code
|
||||
*/
|
||||
public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
if (null === $code) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__);
|
||||
|
||||
$code = 0;
|
||||
}
|
||||
|
||||
if ($retryAfter) {
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
}
|
||||
|
||||
@@ -19,14 +19,24 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
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 \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int|null $code The internal exception code
|
||||
*/
|
||||
public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct($retryAfter = null, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
if (null === $code) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__);
|
||||
|
||||
$code = 0;
|
||||
}
|
||||
|
||||
if ($retryAfter) {
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
}
|
||||
|
||||
@@ -17,14 +17,24 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class UnauthorizedHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $challenge WWW-Authenticate challenge string
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string $challenge WWW-Authenticate challenge string
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int|null $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $challenge, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
public function __construct(string $challenge, ?string $message = '', \Throwable $previous = null, ?int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
if (null === $code) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $code to "%s()" is deprecated, pass 0 instead.', __METHOD__);
|
||||
|
||||
$code = 0;
|
||||
}
|
||||
|
||||
$headers['WWW-Authenticate'] = $challenge;
|
||||
|
||||
parent::__construct(401, $message, $previous, $headers, $code);
|
||||
|
||||
19
vendor/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php
vendored
Normal file
19
vendor/symfony/http-kernel/Exception/UnexpectedSessionUsageException.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Exception;
|
||||
|
||||
/**
|
||||
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
|
||||
*/
|
||||
class UnexpectedSessionUsageException extends \LogicException
|
||||
{
|
||||
}
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class UnprocessableEntityHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(422, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,13 +17,18 @@ namespace Symfony\Component\HttpKernel\Exception;
|
||||
class UnsupportedMediaTypeHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* @param string $message The internal exception message
|
||||
* @param \Throwable $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
* @param array $headers
|
||||
* @param string|null $message The internal exception message
|
||||
* @param \Throwable|null $previous The previous exception
|
||||
* @param int $code The internal exception code
|
||||
*/
|
||||
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
public function __construct(?string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
if (null === $message) {
|
||||
trigger_deprecation('symfony/http-kernel', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
|
||||
|
||||
$message = '';
|
||||
}
|
||||
|
||||
parent::__construct(415, $message, $previous, $headers, $code);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user