Upgrade framework
This commit is contained in:
@@ -12,25 +12,17 @@
|
||||
namespace Symfony\Component\HttpKernel\Exception;
|
||||
|
||||
/**
|
||||
* ServiceUnavailableHttpException.
|
||||
*
|
||||
* @author Ben Ramsey <ben@benramsey.com>
|
||||
*/
|
||||
class ServiceUnavailableHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @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 int $code The internal exception code
|
||||
* @param int|string|null $retryAfter The number of seconds or HTTP-date after which the request may be retried
|
||||
*/
|
||||
public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0)
|
||||
public function __construct(int|string $retryAfter = null, string $message = '', \Throwable $previous = null, int $code = 0, array $headers = [])
|
||||
{
|
||||
$headers = array();
|
||||
if ($retryAfter) {
|
||||
$headers = array('Retry-After' => $retryAfter);
|
||||
$headers['Retry-After'] = $retryAfter;
|
||||
}
|
||||
|
||||
parent::__construct(503, $message, $previous, $headers, $code);
|
||||
|
||||
Reference in New Issue
Block a user