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/polyfill-php70": "~1.0",
|
||||||
"symfony/routing": "~2.8|~3.0",
|
"symfony/routing": "~2.8|~3.0",
|
||||||
"symfony/twig-bridge": "~2.8|~3.0",
|
"symfony/twig-bridge": "~2.8|~3.0",
|
||||||
|
"twig/twig": "~1.28|~2.0",
|
||||||
"symfony/var-dumper": "~3.2"
|
"symfony/var-dumper": "~3.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
@ -106,7 +106,7 @@ class YamlReferenceDumper
|
|||||||
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
|
$comments = count($comments) ? '# '.implode(', ', $comments) : '';
|
||||||
|
|
||||||
$key = $prototypedArray ? '-' : $node->getName().':';
|
$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()) {
|
if ($info = $node->getInfo()) {
|
||||||
$this->writeLine('');
|
$this->writeLine('');
|
||||||
|
@ -49,6 +49,7 @@ class XmlReferenceDumperTest extends \PHPUnit_Framework_TestCase
|
|||||||
scalar-array-empty=""
|
scalar-array-empty=""
|
||||||
scalar-array-defaults="elem1,elem2"
|
scalar-array-defaults="elem1,elem2"
|
||||||
scalar-required=""
|
scalar-required=""
|
||||||
|
node-with-a-looong-name=""
|
||||||
enum-with-default="this"
|
enum-with-default="this"
|
||||||
enum=""
|
enum=""
|
||||||
>
|
>
|
||||||
|
@ -42,6 +42,7 @@ acme_root:
|
|||||||
- elem1
|
- elem1
|
||||||
- elem2
|
- elem2
|
||||||
scalar_required: ~ # Required
|
scalar_required: ~ # Required
|
||||||
|
node_with_a_looong_name: ~
|
||||||
enum_with_default: this # One of "this"; "that"
|
enum_with_default: this # One of "this"; "that"
|
||||||
enum: ~ # 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_empty')->defaultValue(array())->end()
|
||||||
->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end()
|
->scalarNode('scalar_array_defaults')->defaultValue(array('elem1', 'elem2'))->end()
|
||||||
->scalarNode('scalar_required')->isRequired()->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_with_default')->values(array('this', 'that'))->defaultValue('this')->end()
|
||||||
->enumNode('enum')->values(array('this', 'that'))->end()
|
->enumNode('enum')->values(array('this', 'that'))->end()
|
||||||
->arrayNode('array')
|
->arrayNode('array')
|
||||||
|
Reference in New Issue
Block a user