Merge branch '3.2'
* 3.2: add dependency on Twig [Config] Do not skip YamlReferenceDumperTest entirely [Config] Fix YamlReferenceDumper extra space
This commit is contained in:
commit
045ca6aaee
@ -21,6 +21,7 @@
|
||||
"symfony/polyfill-php70": "~1.0",
|
||||
"symfony/routing": "~2.8|~3.0",
|
||||
"symfony/twig-bridge": "~2.8|~3.0",
|
||||
"twig/twig": "~1.28|~2.0",
|
||||
"symfony/var-dumper": "~3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@ -106,7 +106,7 @@ class YamlReferenceDumper
|
||||
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
|
||||
|
||||
$key = $prototypedArray ? '-' : $node->getName().':';
|
||||
$text = rtrim(sprintf('%-20s %s %s', $key, $default, $comments), ' ');
|
||||
$text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' ');
|
||||
|
||||
if ($info = $node->getInfo()) {
|
||||
$this->writeLine('');
|
||||
|
@ -49,6 +49,7 @@ class XmlReferenceDumperTest extends \PHPUnit_Framework_TestCase
|
||||
scalar-array-empty=""
|
||||
scalar-array-defaults="elem1,elem2"
|
||||
scalar-required=""
|
||||
node-with-a-looong-name=""
|
||||
enum-with-default="this"
|
||||
enum=""
|
||||
>
|
||||
|
@ -42,6 +42,7 @@ acme_root:
|
||||
- elem1
|
||||
- elem2
|
||||
scalar_required: ~ # Required
|
||||
node_with_a_looong_name: ~
|
||||
enum_with_default: this # One of "this"; "that"
|
||||
enum: ~ # One of "this"; "that"
|
||||
|
||||
|
@ -35,6 +35,7 @@ class ExampleConfiguration implements ConfigurationInterface
|
||||
->scalarNode('scalar_array_empty')->defaultValue(array())->end()
|
||||
->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end()
|
||||
->scalarNode('scalar_required')->isRequired()->end()
|
||||
->scalarNode('node_with_a_looong_name')->end()
|
||||
->enumNode('enum_with_default')->values(array('this', 'that'))->defaultValue('this')->end()
|
||||
->enumNode('enum')->values(array('this', 'that'))->end()
|
||||
->arrayNode('array')
|
||||
|
Reference in New Issue
Block a user