Skip to content

Commit aacbcef

Browse files
committed
bug symfony#16384 [FrameworkBundle] JsonDescriptor - encode container params only once (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [FrameworkBundle] JsonDescriptor - encode container params only once | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#16379 | License | MIT | Doc PR | Commits ------- dd9d076 JsonDescriptor - encode container params only once
2 parents 9093f1f + dd9d076 commit aacbcef

File tree

7 files changed

+19
-1
lines changed

7 files changed

+19
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected function describeContainerParameter($parameter, array $options = array
157157
{
158158
$key = isset($options['parameter']) ? $options['parameter'] : '';
159159

160-
$this->writeData(array($key => $this->formatParameter($parameter)), $options);
160+
$this->writeData(array($key => $parameter), $options);
161161
}
162162

163163
/**

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public function getDescribeContainerParameterTestData()
113113
$data = $this->getDescriptionTestData(ObjectsProvider::getContainerParameter());
114114

115115
$data[0][] = array('parameter' => 'database_name');
116+
$data[1][] = array('parameter' => 'twig.form.resources');
116117

117118
return $data;
118119
}

src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,16 @@ public static function getContainerParameter()
7272
{
7373
$builder = new ContainerBuilder();
7474
$builder->setParameter('database_name', 'symfony');
75+
$builder->setParameter('twig.form.resources', array(
76+
'bootstrap_3_horizontal_layout.html.twig',
77+
'bootstrap_3_layout.html.twig',
78+
'form_div_layout.html.twig',
79+
'form_table_layout.html.twig',
80+
));
7581

7682
return array(
7783
'parameter' => $builder,
84+
'array_parameter' => $builder,
7885
);
7986
}
8087

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"twig.form.resources": ["bootstrap_3_horizontal_layout.html.twig", "bootstrap_3_layout.html.twig", "form_div_layout.html.twig", "form_table_layout.html.twig"]
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
twig.form.resources
2+
===================
3+
4+
["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo...
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo...
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<parameter key="twig.form.resources">["bootstrap_3_horizontal_layout.html.twig","bootstrap_3_layo...</parameter>

0 commit comments

Comments
 (0)