Skip to content

Commit 481babc

Browse files
committed
Made the config location paragraph a bit shorter
1 parent 8cffa78 commit 481babc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cookbook/serializer.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,14 @@ to your class and choose which groups to use when serializing::
172172
'json', array('groups' => array('group1'))
173173
);
174174
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.
176175

176+
Instead of ``@Groups`` annotations, the Serializer component also supports Yaml
177+
or XML files. These configuration are automatically loaded from these locations:
177178

179+
* The ``serialization.yml`` or ``serialization.xml`` file in
180+
``Resources/config/`` of a bundle;
181+
* All ``*.yml`` and ``*.xml`` files in ``Resources/config/serialization/`` of
182+
a bundle.
178183

179184
.. _cookbook-serializer-enabling-metadata-cache:
180185

0 commit comments

Comments
 (0)