Skip to content

Commit 766edd6

Browse files
committed
feature #6707 Describe serialization config location in cookbook (jcrombez, WouterJ)
This PR was merged into the 2.7 branch. Discussion ---------- Describe serialization config location in cookbook Finishes #6039 Original description: > Text from : http://symfony.com/blog/new-in-symfony-2-7-serializer-component-improvements Commits ------- 80d0cdf Made the config location paragraph a bit shorter 8cffa78 Where to put config file to use the serialization group feature
2 parents ace3104 + 80d0cdf commit 766edd6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cookbook/serializer.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ to your class and choose which groups to use when serializing::
171171
$someObject,
172172
'json', array('groups' => array('group1'))
173173
);
174+
175+
In addition to the ``@Groups`` annotation, the Serializer component also
176+
supports Yaml or XML files. These files are automatically loaded when being
177+
stored in one of the following locations:
178+
179+
* The ``serialization.yml`` or ``serialization.xml`` file in
180+
the ``Resources/config/`` directory of a bundle;
181+
* All ``*.yml`` and ``*.xml`` files in the ``Resources/config/serialization/``
182+
directory of a bundle.
174183

175184
.. _cookbook-serializer-enabling-metadata-cache:
176185

0 commit comments

Comments
 (0)