Skip to content

Commit

Permalink
[FrameworkBundle] Reuse PropertyAccessor service for ObjectNormalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored and fabpot committed Jun 19, 2015
1 parent d209d1c commit 256d441
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml
Expand Up @@ -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">
Expand Down
Expand Up @@ -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" />
Expand Down

0 comments on commit 256d441

Please sign in to comment.