Skip to content

Commit

Permalink
[2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad authored and fabpot committed Mar 11, 2013
1 parent 62f3d2a commit 4f3771d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php
Expand Up @@ -147,9 +147,9 @@ public static function getSubscribedEvents()
// to be removed in 2.3
public function fixOptions(array $options)
{
// support for the standalone option is @deprecated in 2.2 and replaced with the renderer option
// support for the standalone option is @deprecated in 2.2 and replaced with the strategy option
if (isset($options['standalone'])) {
trigger_error('The "standalone" option is deprecated in version 2.2 and replaced with the "renderer" option.', E_USER_DEPRECATED);
trigger_error('The "standalone" option is deprecated in version 2.2 and replaced with the "strategy" option.', E_USER_DEPRECATED);

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

$options['renderer'] = $options['standalone'];
$options['strategy'] = $options['standalone'];
unset($options['standalone']);
}

Expand Down
Expand Up @@ -76,9 +76,9 @@ public function testFixOptions($expected, $options)
public function getFixOptionsData()
{
return array(
array(array('renderer' => 'esi'), array('standalone' => true)),
array(array('renderer' => 'esi'), array('standalone' => 'esi')),
array(array('renderer' => 'hinclude'), array('standalone' => 'js')),
array(array('strategy' => 'esi'), array('standalone' => true)),
array(array('strategy' => 'esi'), array('standalone' => 'esi')),
array(array('strategy' => 'hinclude'), array('standalone' => 'js')),
);
}

Expand Down

0 comments on commit 4f3771d

Please sign in to comment.