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

@@ -18,7 +18,7 @@ use Psr\Cache\CacheItemPoolInterface;
*/
class Psr6CacheClearer implements CacheClearerInterface
{
private $pools = [];
private array $pools = [];
/**
* @param array<string, CacheItemPoolInterface> $pools
@@ -28,20 +28,15 @@ class Psr6CacheClearer implements CacheClearerInterface
$this->pools = $pools;
}
/**
* @return bool
*/
public function hasPool(string $name)
public function hasPool(string $name): bool
{
return isset($this->pools[$name]);
}
/**
* @return CacheItemPoolInterface
*
* @throws \InvalidArgumentException If the cache pool with the given name does not exist
*/
public function getPool(string $name)
public function getPool(string $name): CacheItemPoolInterface
{
if (!$this->hasPool($name)) {
throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name));
@@ -51,11 +46,9 @@ class Psr6CacheClearer implements CacheClearerInterface
}
/**
* @return bool
*
* @throws \InvalidArgumentException If the cache pool with the given name does not exist
*/
public function clearPool(string $name)
public function clearPool(string $name): bool
{
if (!isset($this->pools[$name])) {
throw new \InvalidArgumentException(sprintf('Cache pool not found: "%s".', $name));
@@ -65,7 +58,7 @@ class Psr6CacheClearer implements CacheClearerInterface
}
/**
* {@inheritdoc}
* @return void
*/
public function clear(string $cacheDir)
{