merged branch Aitboudad/ticket_7309 (PR #7321)
This PR was squashed before being merged into the 2.2 branch (closes #7321).
Commits
-------
4f3771d
[2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions
Discussion
----------
[2.2][HttpKernel] fixed wrong option name in FragmentHandler::fixOptions
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/7309
---------------------------------------------------------------------------
by Aitboudad at 2013-03-10T11:38:59Z
Hi @fabpot,
can you see why all commits has failed on Travis ?
---------------------------------------------------------------------------
by henrikbjorn at 2013-03-10T11:42:25Z
The test expects the option to be called `renderer` and not `strategy` so you need to change the tests.
---------------------------------------------------------------------------
by Aitboudad at 2013-03-10T12:19:19Z
@henrikbjorn thanks it's ok, but there is still 1 test :( in Symfony\Component\Form\Tests\Extension\Core\Type\TimeTypeTest::testSetDataDifferentTimezones
@bschussek Can you see why :).
This commit is contained in:
commit
6c1e86c3e1
@ -147,9 +147,9 @@ class FragmentHandler implements EventSubscriberInterface
|
||||
// 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']) {
|
||||
@ -166,7 +166,7 @@ class FragmentHandler implements EventSubscriberInterface
|
||||
$options['standalone'] = 'hinclude';
|
||||
}
|
||||
|
||||
$options['renderer'] = $options['standalone'];
|
||||
$options['strategy'] = $options['standalone'];
|
||||
unset($options['standalone']);
|
||||
}
|
||||
|
||||
|
@ -76,9 +76,9 @@ class FragmentHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
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')),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user