Skip to content

Commit 04595dc

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: add dependency on Twig [Config] Do not skip YamlReferenceDumperTest entirely [Config] Fix YamlReferenceDumper extra space
2 parents aa7d6a2 + be72520 commit 04595dc

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/Symfony/Bundle/WebProfilerBundle/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"php": ">=5.3.9",
2020
"symfony/http-kernel": "~2.4|~3.0.0",
2121
"symfony/routing": "~2.2|~3.0.0",
22-
"symfony/twig-bridge": "~2.7|~3.0.0"
22+
"symfony/twig-bridge": "~2.7|~3.0.0",
23+
"twig/twig": "~1.28|~2.0"
2324
},
2425
"require-dev": {
2526
"symfony/config": "~2.2|~3.0.0",

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

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

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

130130
if ($info = $node->getInfo()) {
131131
$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: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public function testDumper()
2222

2323
$dumper = new YamlReferenceDumper();
2424

25+
$this->assertContains($this->getConfigurationAsString(), $dumper->dump($configuration));
2526
$this->markTestIncomplete('The Yaml Dumper currently does not support prototyped arrays');
26-
$this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration));
2727
}
2828

2929
private function getConfigurationAsString()
@@ -32,7 +32,7 @@ private function getConfigurationAsString()
3232
acme_root:
3333
boolean: true
3434
scalar_empty: ~
35-
scalar_null: ~
35+
scalar_null: null
3636
scalar_true: true
3737
scalar_false: false
3838
scalar_default: default
@@ -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
@@ -59,10 +60,6 @@ enum: ~ # One of "this"; "that"
5960
6061
# Prototype: Parameter name
6162
name: ~
62-
connections:
63-
# Prototype
64-
- { user: ~, pass: ~ }
65-
6663
EOL;
6764
}
6865
}

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)