enable property info
This commit is contained in:
parent
90e95a605f
commit
c02933dba3
@ -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" />
|
||||
|
@ -68,6 +68,7 @@ $container->loadFromExtension('framework', array(
|
||||
'enable_annotations' => true,
|
||||
'name_converter' => 'serializer.name_converter.camel_case_to_snake_case',
|
||||
),
|
||||
'property_info' => true,
|
||||
'ide' => 'file%%link%%format',
|
||||
'request' => array(
|
||||
'formats' => array(
|
||||
|
@ -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>
|
||||
|
@ -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:
|
||||
|
@ -462,6 +462,7 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
$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()
|
||||
|
Reference in New Issue
Block a user