mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°5809 Update Symfony artifacts from 6.4.0 to 6.4.2
symfony/console symfony/dotenv symfony/framework-bundle symfony/http-foundation symfony/http-kernel symfony/var-dumper symfony/web-profiler-bundle
This commit is contained in:
@@ -454,20 +454,30 @@ class AutowirePass extends AbstractRecursivePass
|
||||
$name = $target = (array_filter($reference->getAttributes(), static fn ($a) => $a instanceof Target)[0] ?? null)?->name;
|
||||
|
||||
if (null !== $name ??= $reference->getName()) {
|
||||
if ($this->container->has($alias = $type.' $'.$name) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
return new TypedReference($alias, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
|
||||
if (null !== ($alias = $this->getCombinedAlias($type, $name)) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
return new TypedReference($alias, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
|
||||
$parsedName = (new Target($name))->getParsedName();
|
||||
|
||||
if ($this->container->has($alias = $type.' $'.$parsedName) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
return new TypedReference($alias, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
|
||||
if (null !== ($alias = $this->getCombinedAlias($type, $parsedName) ?? null) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
if (null !== ($alias = $this->getCombinedAlias($type, $parsedName)) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
return new TypedReference($alias, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
|
||||
if ($this->container->has($name) && !$this->container->findDefinition($name)->isAbstract()) {
|
||||
if (($this->container->has($n = $name) && !$this->container->findDefinition($n)->isAbstract())
|
||||
|| ($this->container->has($n = $parsedName) && !$this->container->findDefinition($n)->isAbstract())
|
||||
) {
|
||||
foreach ($this->container->getAliases() as $id => $alias) {
|
||||
if ($name === (string) $alias && str_starts_with($id, $type.' $')) {
|
||||
return new TypedReference($name, $type, $reference->getInvalidBehavior());
|
||||
if ($n === (string) $alias && str_starts_with($id, $type.' $')) {
|
||||
return new TypedReference($n, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -481,7 +491,7 @@ class AutowirePass extends AbstractRecursivePass
|
||||
return new TypedReference($type, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
|
||||
if (null !== ($alias = $this->getCombinedAlias($type) ?? null) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
if (null !== ($alias = $this->getCombinedAlias($type)) && !$this->container->findDefinition($alias)->isAbstract()) {
|
||||
return new TypedReference($alias, $type, $reference->getInvalidBehavior());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user