diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php index f61af1cc95..791593de07 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php @@ -157,7 +157,7 @@ class JsonDescriptor extends Descriptor { $key = isset($options['parameter']) ? $options['parameter'] : ''; - $this->writeData(array($key => $this->formatParameter($parameter)), $options); + $this->writeData(array($key => $parameter), $options); } /** diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php index 8a9800bc86..192ba44bf7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php @@ -113,6 +113,7 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase $data = $this->getDescriptionTestData(ObjectsProvider::getContainerParameter()); $data[0][] = array('parameter' => 'database_name'); + $data[1][] = array('parameter' => 'twig.form.resources'); return $data; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index df3f338fbb..52a6665416 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -72,9 +72,16 @@ class ObjectsProvider { $builder = new ContainerBuilder(); $builder->setParameter('database_name', 'symfony'); + $builder->setParameter('twig.form.resources', array( + 'bootstrap_3_horizontal_layout.html.twig', + 'bootstrap_3_layout.html.twig', + 'form_div_layout.html.twig', + 'form_table_layout.html.twig', + )); return array( 'parameter' => $builder, + 'array_parameter' => $builder, ); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json new file mode 100644 index 0000000000..cb6809159a --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.json @@ -0,0 +1,3 @@ +{ + "twig.form.resources": ["bootstrap_3_horizontal_layout.html.twig", "bootstrap_3_layout.html.twig", "form_div_layout.html.twig", "form_table_layout.html.twig"] +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md new file mode 100644 index 0000000000..593be0cab7 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.md @@ -0,0 +1,4 @@ +twig.form.resources +=================== + +["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt new file mode 100644 index 0000000000..182037f246 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.txt @@ -0,0 +1 @@ +["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo... diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml new file mode 100644 index 0000000000..0e16f57fc9 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/array_parameter.xml @@ -0,0 +1,2 @@ + +["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo...