N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)

* Update Symfony lib to version ~6.4.0
* Update code missing return type
* Add an iTop general configuration entry to store application secret (Symfony mandatory parameter)
* Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
bdalsass
2023-12-05 13:56:56 +01:00
committed by GitHub
parent 863ab4560c
commit 27ce51ab07
1392 changed files with 44869 additions and 27799 deletions

View File

@@ -24,13 +24,15 @@ class RequestStack
/**
* @var Request[]
*/
private $requests = [];
private array $requests = [];
/**
* Pushes a Request on the stack.
*
* This method should generally not be called directly as the stack
* management should be taken care of by the application itself.
*
* @return void
*/
public function push(Request $request)
{
@@ -44,10 +46,8 @@ class RequestStack
*
* This method should generally not be called directly as the stack
* management should be taken care of by the application itself.
*
* @return Request|null
*/
public function pop()
public function pop(): ?Request
{
if (!$this->requests) {
return null;
@@ -56,10 +56,7 @@ class RequestStack
return array_pop($this->requests);
}
/**
* @return Request|null
*/
public function getCurrentRequest()
public function getCurrentRequest(): ?Request
{
return end($this->requests) ?: null;
}
@@ -80,20 +77,6 @@ class RequestStack
return $this->requests[0];
}
/**
* Gets the master request.
*
* @return Request|null
*
* @deprecated since symfony/http-foundation 5.3, use getMainRequest() instead
*/
public function getMasterRequest()
{
trigger_deprecation('symfony/http-foundation', '5.3', '"%s()" is deprecated, use "getMainRequest()" instead.', __METHOD__);
return $this->getMainRequest();
}
/**
* Returns the parent request of the current.
*
@@ -102,10 +85,8 @@ class RequestStack
* like ESI support.
*
* If current Request is the main request, it returns null.
*
* @return Request|null
*/
public function getParentRequest()
public function getParentRequest(): ?Request
{
$pos = \count($this->requests) - 2;