Skip to content

Commit 8cffa78

Browse files
jcrombezwouterj
authored andcommitted
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
1 parent fc4a4e6 commit 8cffa78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cookbook/serializer.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ to your class and choose which groups to use when serializing::
171171
$someObject,
172172
'json', array('groups' => array('group1'))
173173
);
174+
175+
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.
176+
177+
174178

175179
.. _cookbook-serializer-enabling-metadata-cache:
176180

0 commit comments

Comments
 (0)