Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c0a59f

Browse files
committed
bug #25158 [DI] Remove unreachable code (GawainLynch)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] Remove unreachable code | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | #24033 added the ability to ignore uninitialized references, but the regex above the conditional would lead to an `InvalidArgumentException` being thrown. Commits ------- ced0857 Remove unreachable code
2 parents 1d7d564 + ced0857 commit 7c0a59f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ protected function processValue($value, $isRoot = false)
7474
if ($optionalBehavior = '?' === $type[0]) {
7575
$type = substr($type, 1);
7676
$optionalBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
77-
} elseif ($optionalBehavior = '!' === $type[0]) {
78-
$type = substr($type, 1);
79-
$optionalBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
8077
}
8178
if (is_int($key)) {
8279
$key = $type;

0 commit comments

Comments
 (0)