mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
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:
@@ -28,12 +28,12 @@ class PassConfig
|
||||
public const TYPE_OPTIMIZE = 'optimization';
|
||||
public const TYPE_REMOVE = 'removing';
|
||||
|
||||
private $mergePass;
|
||||
private $afterRemovingPasses = [];
|
||||
private $beforeOptimizationPasses = [];
|
||||
private $beforeRemovingPasses = [];
|
||||
private $optimizationPasses;
|
||||
private $removingPasses;
|
||||
private MergeExtensionConfigurationPass $mergePass;
|
||||
private array $afterRemovingPasses;
|
||||
private array $beforeOptimizationPasses;
|
||||
private array $beforeRemovingPasses = [];
|
||||
private array $optimizationPasses;
|
||||
private array $removingPasses;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -43,6 +43,7 @@ class PassConfig
|
||||
100 => [
|
||||
new ResolveClassPass(),
|
||||
new RegisterAutoconfigureAttributesPass(),
|
||||
new AutowireAsDecoratorPass(),
|
||||
new AttributeAutoconfigurationPass(),
|
||||
new ResolveInstanceofConditionalsPass(),
|
||||
new RegisterEnvVarProcessorsPass(),
|
||||
@@ -51,7 +52,7 @@ class PassConfig
|
||||
];
|
||||
|
||||
$this->optimizationPasses = [[
|
||||
$autoAliasServicePass = new AutoAliasServicePass(),
|
||||
new AutoAliasServicePass(),
|
||||
new ValidateEnvPlaceholdersPass(),
|
||||
new ResolveDecoratorStackPass(),
|
||||
new ResolveChildDefinitionsPass(),
|
||||
@@ -79,7 +80,7 @@ class PassConfig
|
||||
|
||||
$this->removingPasses = [[
|
||||
new RemovePrivateAliasesPass(),
|
||||
(new ReplaceAliasByActualDefinitionPass())->setAutoAliasServicePass($autoAliasServicePass),
|
||||
new ReplaceAliasByActualDefinitionPass(),
|
||||
new RemoveAbstractDefinitionsPass(),
|
||||
new RemoveUnusedDefinitionsPass(),
|
||||
new AnalyzeServiceReferencesPass(),
|
||||
@@ -89,11 +90,15 @@ class PassConfig
|
||||
new DefinitionErrorExceptionPass(),
|
||||
]];
|
||||
|
||||
$this->afterRemovingPasses = [[
|
||||
new ResolveHotPathPass(),
|
||||
new ResolveNoPreloadPass(),
|
||||
new AliasDeprecatedPublicServicesPass(),
|
||||
]];
|
||||
$this->afterRemovingPasses = [
|
||||
0 => [
|
||||
new ResolveHotPathPass(),
|
||||
new ResolveNoPreloadPass(),
|
||||
new AliasDeprecatedPublicServicesPass(),
|
||||
],
|
||||
// Let build parameters be available as late as possible
|
||||
-2048 => [new RemoveBuildParametersPass()],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +106,7 @@ class PassConfig
|
||||
*
|
||||
* @return CompilerPassInterface[]
|
||||
*/
|
||||
public function getPasses()
|
||||
public function getPasses(): array
|
||||
{
|
||||
return array_merge(
|
||||
[$this->mergePass],
|
||||
@@ -116,6 +121,8 @@ class PassConfig
|
||||
/**
|
||||
* Adds a pass.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws InvalidArgumentException when a pass type doesn't exist
|
||||
*/
|
||||
public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0)
|
||||
@@ -138,7 +145,7 @@ class PassConfig
|
||||
*
|
||||
* @return CompilerPassInterface[]
|
||||
*/
|
||||
public function getAfterRemovingPasses()
|
||||
public function getAfterRemovingPasses(): array
|
||||
{
|
||||
return $this->sortPasses($this->afterRemovingPasses);
|
||||
}
|
||||
@@ -148,7 +155,7 @@ class PassConfig
|
||||
*
|
||||
* @return CompilerPassInterface[]
|
||||
*/
|
||||
public function getBeforeOptimizationPasses()
|
||||
public function getBeforeOptimizationPasses(): array
|
||||
{
|
||||
return $this->sortPasses($this->beforeOptimizationPasses);
|
||||
}
|
||||
@@ -158,7 +165,7 @@ class PassConfig
|
||||
*
|
||||
* @return CompilerPassInterface[]
|
||||
*/
|
||||
public function getBeforeRemovingPasses()
|
||||
public function getBeforeRemovingPasses(): array
|
||||
{
|
||||
return $this->sortPasses($this->beforeRemovingPasses);
|
||||
}
|
||||
@@ -168,7 +175,7 @@ class PassConfig
|
||||
*
|
||||
* @return CompilerPassInterface[]
|
||||
*/
|
||||
public function getOptimizationPasses()
|
||||
public function getOptimizationPasses(): array
|
||||
{
|
||||
return $this->sortPasses($this->optimizationPasses);
|
||||
}
|
||||
@@ -178,21 +185,22 @@ class PassConfig
|
||||
*
|
||||
* @return CompilerPassInterface[]
|
||||
*/
|
||||
public function getRemovingPasses()
|
||||
public function getRemovingPasses(): array
|
||||
{
|
||||
return $this->sortPasses($this->removingPasses);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Merge pass.
|
||||
*
|
||||
* @return CompilerPassInterface
|
||||
*/
|
||||
public function getMergePass()
|
||||
public function getMergePass(): CompilerPassInterface
|
||||
{
|
||||
return $this->mergePass;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setMergePass(CompilerPassInterface $pass)
|
||||
{
|
||||
$this->mergePass = $pass;
|
||||
@@ -202,6 +210,8 @@ class PassConfig
|
||||
* Sets the AfterRemoving passes.
|
||||
*
|
||||
* @param CompilerPassInterface[] $passes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setAfterRemovingPasses(array $passes)
|
||||
{
|
||||
@@ -212,6 +222,8 @@ class PassConfig
|
||||
* Sets the BeforeOptimization passes.
|
||||
*
|
||||
* @param CompilerPassInterface[] $passes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setBeforeOptimizationPasses(array $passes)
|
||||
{
|
||||
@@ -222,6 +234,8 @@ class PassConfig
|
||||
* Sets the BeforeRemoving passes.
|
||||
*
|
||||
* @param CompilerPassInterface[] $passes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setBeforeRemovingPasses(array $passes)
|
||||
{
|
||||
@@ -232,6 +246,8 @@ class PassConfig
|
||||
* Sets the Optimization passes.
|
||||
*
|
||||
* @param CompilerPassInterface[] $passes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setOptimizationPasses(array $passes)
|
||||
{
|
||||
@@ -242,6 +258,8 @@ class PassConfig
|
||||
* Sets the Removing passes.
|
||||
*
|
||||
* @param CompilerPassInterface[] $passes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setRemovingPasses(array $passes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user