mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°8910 - Upgrade Symfony packages (#811)
This commit is contained in:
@@ -41,6 +41,7 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass
|
||||
private bool $lazy;
|
||||
private bool $byConstructor;
|
||||
private bool $byFactory;
|
||||
private bool $byMultiUseArgument;
|
||||
private array $definitions;
|
||||
private array $aliases;
|
||||
|
||||
@@ -67,6 +68,7 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass
|
||||
$this->lazy = false;
|
||||
$this->byConstructor = false;
|
||||
$this->byFactory = false;
|
||||
$this->byMultiUseArgument = false;
|
||||
$this->definitions = $container->getDefinitions();
|
||||
$this->aliases = $container->getAliases();
|
||||
|
||||
@@ -89,7 +91,12 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass
|
||||
|
||||
if ($value instanceof ArgumentInterface) {
|
||||
$this->lazy = !$this->byFactory || !$value instanceof IteratorArgument;
|
||||
$byMultiUseArgument = $this->byMultiUseArgument;
|
||||
if ($value instanceof IteratorArgument) {
|
||||
$this->byMultiUseArgument = true;
|
||||
}
|
||||
parent::processValue($value->getValues());
|
||||
$this->byMultiUseArgument = $byMultiUseArgument;
|
||||
$this->lazy = $lazy;
|
||||
|
||||
return $value;
|
||||
@@ -106,7 +113,8 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass
|
||||
$value,
|
||||
$this->lazy || ($this->hasProxyDumper && $targetDefinition?->isLazy()),
|
||||
ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(),
|
||||
$this->byConstructor
|
||||
$this->byConstructor,
|
||||
$this->byMultiUseArgument
|
||||
);
|
||||
|
||||
if ($inExpression) {
|
||||
@@ -117,7 +125,9 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass
|
||||
$targetDefinition,
|
||||
$value,
|
||||
$this->lazy || $targetDefinition?->isLazy(),
|
||||
true
|
||||
true,
|
||||
$this->byConstructor,
|
||||
$this->byMultiUseArgument
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user