Skip to content

Commit 685a9b9

Browse files
committed
[Config] Fix YamlReferenceDumper extra space
1 parent c360a22 commit 685a9b9

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private function writeNode(NodeInterface $node, $depth = 0)
120120
$default = (string) $default != '' ? ' '.$default : '';
121121
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
122122

123-
$text = rtrim(sprintf('%-20s %s %s', $node->getName().':', $default, $comments), ' ');
123+
$text = rtrim(sprintf('%-21s%s %s', $node->getName().':', $default, $comments), ' ');
124124

125125
if ($info = $node->getInfo()) {
126126
$this->writeLine('');

src/Symfony/Component/Config/Tests/Definition/Dumper/XmlReferenceDumperTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ private function getConfigurationAsString()
4949
scalar-array-empty=""
5050
scalar-array-defaults="elem1,elem2"
5151
scalar-required=""
52+
node-with-a-looong-name=""
5253
enum-with-default="this"
5354
enum=""
5455
>

src/Symfony/Component/Config/Tests/Definition/Dumper/YamlReferenceDumperTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ private function getConfigurationAsString()
4343
- elem1
4444
- elem2
4545
scalar_required: ~ # Required
46+
node_with_a_looong_name: ~
4647
enum_with_default: this # One of "this"; "that"
4748
enum: ~ # One of "this"; "that"
4849

src/Symfony/Component/Config/Tests/Fixtures/Configuration/ExampleConfiguration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function getConfigTreeBuilder()
3434
->scalarNode('scalar_array_empty')->defaultValue(array())->end()
3535
->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end()
3636
->scalarNode('scalar_required')->isRequired()->end()
37+
->scalarNode('node_with_a_looong_name')->end()
3738
->enumNode('enum_with_default')->values(array('this', 'that'))->defaultValue('this')->end()
3839
->enumNode('enum')->values(array('this', 'that'))->end()
3940
->arrayNode('array')

0 commit comments

Comments
 (0)