8000 minor #22498 [DI] Add missing check in PhpDumper (nicolas-grekas) · symfony/symfony@9774780 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9774780

Browse files
minor #22498 [DI] Add missing check in PhpDumper (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [DI] Add missing check in PhpDumper | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 5cabf88 [DI] Add missing check in PhpDumper
2 parents 81f48b8 + 5cabf88 commit 9774780

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,9 +1331,12 @@ private function dumpValue($value, $interpolate = true)
13311331
if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) {
13321332
return $this->dumpValue($this->definitionVariables->offsetGet($value), $interpolate);
13331333
}
1334-
if (count($value->getMethodCalls()) > 0) {
1334+
if ($value->getMethodCalls()) {
13351335
throw new RuntimeException('Cannot dump definitions which have method calls.');
13361336
}
1337+
if ($value->getProperties()) {
1338+
throw new RuntimeException('Cannot dump definitions which have properties.');
1339+
}
13371340
if (null !== $value->getConfigurator()) {
13381341
throw new RuntimeException('Cannot dump definitions which have a configurator.');
13391342
}

0 commit comments

Comments
 (0)
0