Skip to content

Commit 4f3771d

Browse files
aitboudadfabpot
authored andcommitted
[2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions
1 parent 62f3d2a commit 4f3771d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public static function getSubscribedEvents()
147147
// to be removed in 2.3
148148
public function fixOptions(array $options)
149149
{
150-
// support for the standalone option is @deprecated in 2.2 and replaced with the renderer option
150+
// support for the standalone option is @deprecated in 2.2 and replaced with the strategy option
151151
if (isset($options['standalone'])) {
152-
trigger_error('The "standalone" option is deprecated in version 2.2 and replaced with the "renderer" option.', E_USER_DEPRECATED);
152+
trigger_error('The "standalone" option is deprecated in version 2.2 and replaced with the "strategy" option.', E_USER_DEPRECATED);
153153

154154
// support for the true value is @deprecated in 2.2, will be removed in 2.3
155155
if (true === $options['standalone']) {
@@ -166,7 +166,7 @@ public function fixOptions(array $options)
166166
$options['standalone'] = 'hinclude';
167167
}
168168

169-
$options['renderer'] = $options['standalone'];
169+
$options['strategy'] = $options['standalone'];
170170
unset($options['standalone']);
171171
}
172172

src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public function testFixOptions($expected, $options)
7676
public function getFixOptionsData()
7777
{
7878
return array(
79-
array(array('renderer' => 'esi'), array('standalone' => true)),
80-
array(array('renderer' => 'esi'), array('standalone' => 'esi')),
81-
array(array('renderer' => 'hinclude'), array('standalone' => 'js')),
79+
array(array('strategy' => 'esi'), array('standalone' => true)),
80+
array(array('strategy' => 'esi'), array('standalone' => 'esi')),
81+
array(array('strategy' => 'hinclude'), array('standalone' => 'js')),
8282
);
8383
}
8484

0 commit comments

Comments
 (0)