upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -24,6 +24,12 @@ class AccessDeniedHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,12 @@ class BadRequestHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,12 @@ class ConflictHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,12 @@ class GoneHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,17 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface
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;

View File

@@ -21,14 +21,14 @@ 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();
}

View 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
{
}

View File

@@ -23,6 +23,12 @@ class LengthRequiredHttpException extends HttpException
*/
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);
}
}

View File

@@ -24,6 +24,17 @@ class MethodNotAllowedHttpException extends HttpException
*/
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);

View File

@@ -23,6 +23,12 @@ class NotAcceptableHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,12 @@ class NotFoundHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,12 @@ class PreconditionFailedHttpException extends HttpException
*/
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);
}
}

View File

@@ -25,6 +25,12 @@ class PreconditionRequiredHttpException extends HttpException
*/
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);
}
}

View File

@@ -24,6 +24,17 @@ class ServiceUnavailableHttpException extends HttpException
*/
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;
}

View File

@@ -26,6 +26,17 @@ class TooManyRequestsHttpException extends HttpException
*/
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;
}

View File

@@ -24,6 +24,17 @@ class UnauthorizedHttpException extends HttpException
*/
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);

View 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
{
}

View File

@@ -23,6 +23,12 @@ class UnprocessableEntityHttpException extends HttpException
*/
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);
}
}

View File

@@ -23,6 +23,12 @@ class UnsupportedMediaTypeHttpException extends HttpException
*/
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);
}
}