Skip to content

Commit 7805bfa

Browse files
committed
fixed groups to default to an empty collection
1 parent 6d503a7 commit 7805bfa

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ CHANGELOG
44
1.7.9
55
-----
66

7+
* fixed that the default exclusion strategy groups for the serializer are not the empty string
8+
79
* fixed a BC break that prevented the `CamelKeysNormalizer` from removing leading underscores
810

911
* fixed the `AllowedMethodsRouteLoader` to work with Symfony 3.0

Resources/config/view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<parameters>
88
<parameter key="fos_rest.serializer.exclusion_strategy.version" />
9-
<parameter key="fos_rest.serializer.exclusion_strategy.groups"/>
9+
<parameter key="fos_rest.serializer.exclusion_strategy.groups" type="collection" />
1010
<parameter key="fos_rest.view_handler.jsonp.callback_param"/>
1111
<parameter key="fos_rest.view.exception_wrapper_handler">FOS\RestBundle\View\ExceptionWrapperHandler</parameter>
1212
<parameter key="fos_rest.view_handler.default.class">FOS\RestBundle\View\ViewHandler</parameter>

Tests/DependencyInjection/FOSRestExtensionTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ public function testValidatorAliasWhenDisabled()
334334
$this->assertFalse($this->container->has('fos_rest.validator'));
335335
}
336336

337+
public function testDefaultSerializerGroupsIsArray()
338+
{
339+
$config = array();
340+
$this->extension->load($config, $this->container);
341+
342+
$this->assertInternaltype('array', $this->container->getParameter('fos_rest.serializer.exclusion_strategy.groups'));
343+
}
344+
337345
/**
338346
* Test that extension loads properly.
339347
*/

0 commit comments

Comments
 (0)