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

@@ -46,7 +46,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
* will try to carry on and deliver a meaningful response.
*
* * trace_level May be one of 'none', 'short' and 'full'. For 'short', a concise trace of the
* master request will be added as an HTTP header. 'full' will add traces for all
* main request will be added as an HTTP header. 'full' will add traces for all
* requests (including ESI subrequests). (default: 'full' if in debug; 'none' otherwise)
*
* * trace_header Header name to use for traces. (default: X-Symfony-Cache)
@@ -108,7 +108,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* Gets the current store.
*
* @return StoreInterface A StoreInterface instance
* @return StoreInterface
*/
public function getStore()
{
@@ -118,7 +118,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* Returns an array of events that took place during processing of the last request.
*
* @return array An array of events
* @return array
*/
public function getTraces()
{
@@ -145,7 +145,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* Returns a log message for the events of the last request processing.
*
* @return string A log message
* @return string
*/
public function getLog()
{
@@ -158,9 +158,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
}
/**
* Gets the Request instance associated with the master request.
* Gets the Request instance associated with the main request.
*
* @return Request A Request instance
* @return Request
*/
public function getRequest()
{
@@ -170,7 +170,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* Gets the Kernel instance.
*
* @return HttpKernelInterface An HttpKernelInterface instance
* @return HttpKernelInterface
*/
public function getKernel()
{
@@ -180,7 +180,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* Gets the Surrogate instance.
*
* @return SurrogateInterface A Surrogate instance
* @return SurrogateInterface
*
* @throws \LogicException
*/
@@ -192,10 +192,10 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* {@inheritdoc}
*/
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
// FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism
if (HttpKernelInterface::MASTER_REQUEST === $type) {
if (HttpKernelInterface::MAIN_REQUEST === $type) {
$this->traces = [];
// Keep a clone of the original request for surrogates so they can access it.
// We must clone here to get a separate instance because the application will modify the request during
@@ -226,12 +226,12 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
$this->restoreResponseBody($request, $response);
if (HttpKernelInterface::MASTER_REQUEST === $type) {
if (HttpKernelInterface::MAIN_REQUEST === $type) {
$this->addTraces($response);
}
if (null !== $this->surrogate) {
if (HttpKernelInterface::MASTER_REQUEST === $type) {
if (HttpKernelInterface::MAIN_REQUEST === $type) {
$this->surrogateCacheStrategy->update($response);
} else {
$this->surrogateCacheStrategy->add($response);
@@ -260,9 +260,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
*
* @param bool $catch Whether to process exceptions
*
* @return Response A Response instance
* @return Response
*/
protected function pass(Request $request, $catch = false)
protected function pass(Request $request, bool $catch = false)
{
$this->record($request, 'pass');
@@ -274,13 +274,13 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
*
* @param bool $catch Whether to process exceptions
*
* @return Response A Response instance
* @return Response
*
* @throws \Exception
*
* @see RFC2616 13.10
*/
protected function invalidate(Request $request, $catch = false)
protected function invalidate(Request $request, bool $catch = false)
{
$response = $this->pass($request, $catch);
@@ -322,11 +322,11 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
*
* @param bool $catch Whether to process exceptions
*
* @return Response A Response instance
* @return Response
*
* @throws \Exception
*/
protected function lookup(Request $request, $catch = false)
protected function lookup(Request $request, bool $catch = false)
{
try {
$entry = $this->store->lookup($request);
@@ -371,9 +371,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
*
* @param bool $catch Whether to process exceptions
*
* @return Response A Response instance
* @return Response
*/
protected function validate(Request $request, Response $entry, $catch = false)
protected function validate(Request $request, Response $entry, bool $catch = false)
{
$subRequest = clone $request;
@@ -434,9 +434,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
*
* @param bool $catch Whether to process exceptions
*
* @return Response A Response instance
* @return Response
*/
protected function fetch(Request $request, $catch = false)
protected function fetch(Request $request, bool $catch = false)
{
$subRequest = clone $request;
@@ -467,16 +467,16 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
* @param bool $catch Whether to catch exceptions or not
* @param Response|null $entry A Response instance (the stale entry if present, null otherwise)
*
* @return Response A Response instance
* @return Response
*/
protected function forward(Request $request, $catch = false, Response $entry = null)
protected function forward(Request $request, bool $catch = false, Response $entry = null)
{
if ($this->surrogate) {
$this->surrogate->addSurrogateCapability($request);
}
// always a "master" request (as the real master request can be in cache)
$response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, $catch);
$response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
/*
* Support stale-if-error given on Responses or as a config option.
@@ -540,7 +540,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/**
* Checks whether the cache entry is "fresh enough" to satisfy the Request.
*
* @return bool true if the cache entry if fresh enough, false otherwise
* @return bool
*/
protected function isFreshEnough(Request $request, Response $entry)
{