Skip to content

Commit 310c725

Browse files
[DependencyInjection] Fix dumping containers with null-references services
1 parent 18fa44a commit 310c725

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ private function getServiceCall(string $id, Reference $reference = null): string
20402040
return 'null';
20412041
}
20422042
if (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE < $reference->getInvalidBehavior()) {
2043-
$code = sprintf('$container->get(%s, ContainerInterface::NULL_ON_INVALID_REFERENCE)', $this->doExport($id));
2043+
$code = sprintf('$container->get(%s, $container::NULL_ON_INVALID_REFERENCE)', $this->doExport($id));
20442044
} else {
20452045
$code = sprintf('$container->get(%s)', $this->doExport($id));
20462046
}

0 commit comments

Comments
 (0)