Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 869c734

Browse filesBrowse files
committed
bug #40386 [DependencyInjection][Security] Backport psr/container 1.1/2.0 compatibility (derrabus)
This PR was merged into the 4.4 branch. Discussion ---------- [DependencyInjection][Security] Backport psr/container 1.1/2.0 compatibility | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix https://github.com/symfony/symfony/pull/40384/files#r588494278 | License | MIT | Doc PR | N/A This PR backports a fix that I had to apply to the 5.x branch in order to make it compatible with the `psr/container` 1.1 interfaces. It also updates various composer.json files: * Security Core only consumes a PSR `ContainerInterface` without providing its own implementation. I should be compatible with version 2 of the PSR package already. * ~~DependencyInjection breaks on PHP 7.2 and 7.3 if `psr/container` 1.1.0 is installed. A version 1.1.1 has already been release that fixes the issue. I've added a conflict rule to document the incompatibility.~~ Commits ------- 7f8242e Backport psr/container 1.1/2.0 compatibility
2 parents 2536e17 + 7f8242e commit 869c734
Copy full SHA for 869c734

File tree

Expand file treeCollapse file tree

3 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-3
lines changed

‎src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot):
146146
$this->decoratedClass = null;
147147
$this->getPreviousValue = null;
148148

149-
if ($isRoot && ($definition = $this->container->getDefinition($this->currentId)) && $this->container->has($this->decoratedId = $definition->innerServiceId)) {
149+
if ($isRoot && ($definition = $this->container->getDefinition($this->currentId)) && null !== ($this->decoratedId = $definition->innerServiceId) && $this->container->has($this->decoratedId)) {
150150
$this->decoratedClass = $this->container->findDefinition($this->decoratedId)->getClass();
151151
}
152152

‎src/Symfony/Component/Security/Core/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/service-contracts": "^1.1.6|^2"
2222
},
2323
"require-dev": {
24-
"psr/container": "^1.0",
24+
"psr/container": "^1.0|^2.0",
2525
"symfony/event-dispatcher": "^4.3",
2626
"symfony/expression-language": "^3.4|^4.0|^5.0",
2727
"symfony/http-foundation": "^3.4|^4.0|^5.0",

‎src/Symfony/Component/Security/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"symfony/security-http": "self.version"
3131
},
3232
"require-dev": {
33-
"psr/container": "^1.0",
33+
"psr/container": "^1.0|^2.0",
3434
"symfony/finder": "^3.4|^4.0|^5.0",
3535
"symfony/polyfill-ctype": "~1.8",
3636
"symfony/polyfill-intl-icu": "~1.0",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.