From 596af92047b03db50ae7c8b30256c6615f3751e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20CROMBEZ?= Date: Thu, 17 Dec 2015 18:27:14 +0100 Subject: [PATCH] Where to put config file to use the serialization group feature Text from : http://symfony.com/blog/new-in-symfony-2-7-serializer-component-improvements --- cookbook/serializer.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbook/serializer.rst b/cookbook/serializer.rst index 8b2d9b296d8..f8a3e84513c 100644 --- a/cookbook/serializer.rst +++ b/cookbook/serializer.rst @@ -171,6 +171,10 @@ to your class and choose which groups to use when serializing:: $someObject, 'json', array('groups' => array('group1')) ); + +For those of you who don't like annotations, you can define serialization groups via XML or YAML files. The Serializer component will look for serialization.xml or serialization.yml files located in the Resources/config/ directory of your bundles. In addition, it will look for any XML or YAML file located inside the Resources/config/serialization/ directory. + + .. _cookbook-serializer-enabling-metadata-cache: