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,24 +24,20 @@ class ApplicationDescription
{
public const GLOBAL_NAMESPACE = '_global';
private $application;
private $namespace;
private $showHidden;
/**
* @var array
*/
private $namespaces;
private Application $application;
private ?string $namespace;
private bool $showHidden;
private array $namespaces;
/**
* @var array<string, Command>
*/
private $commands;
private array $commands;
/**
* @var array<string, Command>
*/
private $aliases;
private array $aliases = [];
public function __construct(Application $application, string $namespace = null, bool $showHidden = false)
{
@@ -52,7 +48,7 @@ class ApplicationDescription
public function getNamespaces(): array
{
if (null === $this->namespaces) {
if (!isset($this->namespaces)) {
$this->inspectApplication();
}
@@ -64,7 +60,7 @@ class ApplicationDescription
*/
public function getCommands(): array
{
if (null === $this->commands) {
if (!isset($this->commands)) {
$this->inspectApplication();
}
@@ -83,7 +79,7 @@ class ApplicationDescription
return $this->commands[$name] ?? $this->aliases[$name];
}
private function inspectApplication()
private function inspectApplication(): void
{
$this->commands = [];
$this->namespaces = [];