Skip to content

Commit

Permalink
enable property info
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura authored and nicolas-grekas committed Jul 27, 2016
1 parent 90e95a6 commit c02933d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
Expand Up @@ -21,6 +21,7 @@
<argument type="service" id="serializer.mapping.class_metadata_factory" />
<argument>null</argument> <!-- name converter -->
<argument type="service" id="serializer.property_accessor" />
<argument type="service" id="property_info" on-invalid="ignore" />

<!-- Run after all custom serializers -->
<tag name="serializer.normalizer" priority="-1000" />
Expand Down
Expand Up @@ -68,6 +68,7 @@
'enable_annotations' => true,
'name_converter' => 'serializer.name_converter.camel_case_to_snake_case',
),
'property_info' => true,
'ide' => 'file%%link%%format',
'request' => array(
'formats' => array(
Expand Down
Expand Up @@ -41,5 +41,6 @@
<framework:validation enabled="true" cache="validator.mapping.cache.doctrine.apc" />
<framework:annotations cache="file" debug="true" file-cache-dir="%kernel.cache_dir%/annotations" />
<framework:serializer enabled="true" enable-annotations="true" name-converter="serializer.name_converter.camel_case_to_snake_case" />
<framework:property-info />
</framework:config>
</container>
Expand Up @@ -53,6 +53,7 @@ framework:
enabled: true
enable_annotations: true
name_converter: serializer.name_converter.camel_case_to_snake_case
property_info: ~
ide: file%%link%%format
request:
formats:
Expand Down
Expand Up @@ -462,6 +462,7 @@ public function testSerializerEnabled()
$this->assertEquals('Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader', $argument[0]->getClass());
$this->assertNull($container->getDefinition('serializer.mapping.class_metadata_factory')->getArgument(1));
$this->assertEquals(new Reference('serializer.name_converter.camel_case_to_snake_case'), $container->getDefinition('serializer.normalizer.object')->getArgument(1));
$this->assertEquals(new Reference('property_info', ContainerBuilder::IGNORE_ON_INVALID_REFERENCE), $container->getDefinition('serializer.normalizer.object')->getArgument(3));
}

public function testRegisterSerializerExtractor()
Expand Down

0 comments on commit c02933d

Please sign in to comment.