[FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer

This commit is contained in:
Kévin Dunglas 2015-06-15 10:18:21 +02:00 committed by Fabien Potencier
parent d209d1c35a
commit 256d441b21
2 changed files with 7 additions and 1 deletions

View File

@ -55,8 +55,10 @@
</service>
<!-- CoreExtension -->
<service id="form.property_accessor" alias="property_accessor" public="false" />
<service id="form.type.form" class="Symfony\Component\Form\Extension\Core\Type\FormType">
<argument type="service" id="property_accessor"/>
<argument type="service" id="form.property_accessor" />
<tag name="form.type" alias="form" />
</service>
<service id="form.type.birthday" class="Symfony\Component\Form\Extension\Core\Type\BirthdayType">

View File

@ -17,9 +17,13 @@
<argument type="collection" />
</service>
<service id="serializer.property_accessor" alias="property_accessor" public="false" />
<!-- Normalizer -->
<service id="serializer.normalizer.object" class="Symfony\Component\Serializer\Normalizer\ObjectNormalizer" public="false">
<argument type="service" id="serializer.mapping.class_metadata_factory" />
<argument>null</argument>
<argument type="service" id="serializer.property_accessor" />
<!-- Run after all custom serializers -->
<tag name="serializer.normalizer" priority="-1000" />