8000 bug #21220 [DI] Fix missing new line after private alias (ogizanagi) · symfony/symfony@44f6a8c · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 44f6a8c

Browse files
committed
bug #21220 [DI] Fix missing new line after private alias (ogizanagi)
This PR was merged into the 2.7 branch. Discussion ---------- [DI] Fix missing new line after private alias | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21219 (comment) | License | MIT | Doc PR | N/A Without this change, the output is: ```yml # [...] alias_for_foo: '@foo' another_alias_for_foo: alias: foo public: false another_third_alias_for_foo: '@foo' # <--- missing new line after `public: false` ``` (this is tested by the `CrossCheckTest` but there is no fixture file to update (automatically dumped and removed by the test case)) Commits ------- 101a165 [DI] Fix missing new line after private alias
2 parents e9f2512 + 101a165 commit 44f6a8c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private function addServiceAlias($alias, $id)
165165
return sprintf(" %s: '@%s'\n", $alias, $id);
166166
}
167167

168-
return sprintf(" %s:\n alias: %s\n public: false", $alias, $id);
168+
return sprintf(" %s:\n alias: %s\n public: false\n", $alias, $id);
169169
}
170170

171171
/**

src/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ services:
2323
another_alias_for_foo:
2424
alias: foo
2525
public: false
26+
another_third_alias_for_foo:
27+
alias: foo
2628
decorator_service:
2729
decorates: decorated
2830
decorator_service_with_name:

0 commit comments

Comments
 (0)
0