Skip to content

Commit d3114d1

Browse files
committed
bug symfony#17823 [DependencyInjection] fix dumped YAML string (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [DependencyInjection] fix dumped YAML string | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- b1bb135 [DependencyInjection] fix dumped YAML string
2 parents 1dcf83c + b1bb135 commit d3114d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private function addService($id, $definition)
8888
}
8989

9090
if ($definition->getFile()) {
91-
$code .= sprintf(" file: %s\n", $definition->getFile());
91+
$code .= sprintf(" file: %s\n", $this->dumper->dump($definition->getFile()));
9292
}
9393

9494
if ($definition->isSynthetic()) {
@@ -108,11 +108,11 @@ private function addService($id, $definition)
108108
}
109109

110110
if ($definition->getFactoryMethod()) {
111-
$code .= sprintf(" factory_method: %s\n", $definition->getFactoryMethod());
111+
$code .= sprintf(" factory_method: %s\n", $this->dumper->dump($definition->getFactoryMethod()));
112112
}
113113

114114
if ($definition->getFactoryService()) {
115-
$code .= sprintf(" factory_service: %s\n", $definition->getFactoryService());
115+
$code .= sprintf(" factory_service: %s\n", $this->dumper->dump($definition->getFactoryService()));
116116
}
117117

118118
if ($definition->getArguments()) {
@@ -128,7 +128,7 @@ private function addService($id, $definition)
128128
}
129129

130130
if (ContainerInterface::SCOPE_CONTAINER !== $scope = $definition->getScope()) {
131-
$code .= sprintf(" scope: %s\n", $scope);
131+
$code .= sprintf(" scope: %s\n", $this->dumper->dump($scope));
132132
}
133133

134134
if ($callable = $definition->getConfigurator()) {

0 commit comments

Comments
 (0)