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

@@ -38,7 +38,7 @@ class Translator extends BaseTranslator implements WarmableInterface
/**
* @var list<string>
*/
private $resourceLocales;
private array $resourceLocales;
/**
* Holds parameters from addResource() calls so we can defer the actual
@@ -46,22 +46,22 @@ class Translator extends BaseTranslator implements WarmableInterface
*
* @var array[]
*/
private $resources = [];
private array $resources = [];
/**
* @var string[][]
*/
private $resourceFiles;
private array $resourceFiles;
/**
* @var string[]
*/
private $scannedDirectories;
private array $scannedDirectories;
/**
* @var string[]
*/
private $enabledLocales;
private array $enabledLocales;
/**
* Constructor.
@@ -95,11 +95,9 @@ class Translator extends BaseTranslator implements WarmableInterface
}
/**
* {@inheritdoc}
*
* @return string[]
* @param string|null $buildDir
*/
public function warmUp(string $cacheDir)
public function warmUp(string $cacheDir /* , string $buildDir = null */): array
{
// skip warmUp when translator doesn't use cache
if (null === $this->options['cache_dir']) {
@@ -120,7 +118,7 @@ class Translator extends BaseTranslator implements WarmableInterface
return [];
}
public function addResource(string $format, $resource, string $locale, string $domain = null)
public function addResource(string $format, mixed $resource, string $locale, string $domain = null): void
{
if ($this->resourceFiles) {
$this->addResourceFiles();
@@ -128,10 +126,7 @@ class Translator extends BaseTranslator implements WarmableInterface
$this->resources[] = [$format, $resource, $locale, $domain];
}
/**
* {@inheritdoc}
*/
protected function initializeCatalogue(string $locale)
protected function initializeCatalogue(string $locale): void
{
$this->initialize();
parent::initializeCatalogue($locale);
@@ -150,6 +145,9 @@ class Translator extends BaseTranslator implements WarmableInterface
}
}
/**
* @return void
*/
protected function initialize()
{
if ($this->resourceFiles) {