This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -17,7 +17,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class AccessDeniedHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(403, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class BadRequestHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(400, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class ConflictHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(409, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class GoneHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(410, $message, $previous, $headers, $code);
}

View File

@@ -21,7 +21,7 @@ class HttpException extends \RuntimeException implements HttpExceptionInterface
private int $statusCode;
private array $headers;
public function __construct(int $statusCode, string $message = '', \Throwable $previous = null, array $headers = [], int $code = 0)
public function __construct(int $statusCode, string $message = '', ?\Throwable $previous = null, array $headers = [], int $code = 0)
{
$this->statusCode = $statusCode;
$this->headers = $headers;

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class LengthRequiredHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(411, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class LockedHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(423, $message, $previous, $headers, $code);
}

View File

@@ -19,7 +19,7 @@ class MethodNotAllowedHttpException extends HttpException
/**
* @param string[] $allow An array of allowed methods
*/
public function __construct(array $allow, string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(array $allow, string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
$headers['Allow'] = strtoupper(implode(', ', $allow));

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class NotAcceptableHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(406, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class NotFoundHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(404, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class PreconditionFailedHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(412, $message, $previous, $headers, $code);
}

View File

@@ -18,7 +18,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class PreconditionRequiredHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(428, $message, $previous, $headers, $code);
}

View File

@@ -19,7 +19,7 @@ class ServiceUnavailableHttpException extends HttpException
/**
* @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried
*/
public function __construct(int|string $retryAfter = null, string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(int|string|null $retryAfter = null, string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
if ($retryAfter) {
$headers['Retry-After'] = $retryAfter;

View File

@@ -21,7 +21,7 @@ class TooManyRequestsHttpException extends HttpException
/**
* @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried
*/
public function __construct(int|string $retryAfter = null, string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(int|string|null $retryAfter = null, string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
if ($retryAfter) {
$headers['Retry-After'] = $retryAfter;

View File

@@ -19,7 +19,7 @@ class UnauthorizedHttpException extends HttpException
/**
* @param string $challenge WWW-Authenticate challenge string
*/
public function __construct(string $challenge, string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $challenge, string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
$headers['WWW-Authenticate'] = $challenge;

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class UnprocessableEntityHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(422, $message, $previous, $headers, $code);
}

View File

@@ -16,7 +16,7 @@ namespace Symfony\Component\HttpKernel\Exception;
*/
class UnsupportedMediaTypeHttpException extends HttpException
{
public function __construct(string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
public function __construct(string $message = '', ?\Throwable $previous = null, int $code = 0, array $headers = [])
{
parent::__construct(415, $message, $previous, $headers, $code);
}