Skip to content

Commit 249700b

Browse files
[DI] Add missing check in PhpDumper
1 parent bb43267 commit 249700b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)