Backport psr/container 1.1/2.0 compatibility

This commit is contained in:
Alexander M. Turek 2021-03-05 18:38:07 +01:00
parent 2536e178b1
commit 7f8242ef58
3 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ class AutowirePass extends AbstractRecursivePass
$this->decoratedClass = null;
$this->getPreviousValue = null;
if ($isRoot && ($definition = $this->container->getDefinition($this->currentId)) && $this->container->has($this->decoratedId = $definition->innerServiceId)) {
if ($isRoot && ($definition = $this->container->getDefinition($this->currentId)) && null !== ($this->decoratedId = $definition->innerServiceId) && $this->container->has($this->decoratedId)) {
$this->decoratedClass = $this->container->findDefinition($this->decoratedId)->getClass();
}

View File

@ -21,7 +21,7 @@
"symfony/service-contracts": "^1.1.6|^2"
},
"require-dev": {
"psr/container": "^1.0",
"psr/container": "^1.0|^2.0",
"symfony/event-dispatcher": "^4.3",
"symfony/expression-language": "^3.4|^4.0|^5.0",
"symfony/http-foundation": "^3.4|^4.0|^5.0",

View File

@ -30,7 +30,7 @@
"symfony/security-http": "self.version"
},
"require-dev": {
"psr/container": "^1.0",
"psr/container": "^1.0|^2.0",
"symfony/finder": "^3.4|^4.0|^5.0",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-icu": "~1.0",