8000 [Serializer] Add Default and "class name" default groups · symfony/symfony-docs@4085aed · GitHub
[go: up one dir, main page]

Skip to content

Commit 4085aed

Browse files
[Serializer] Add Default and "class name" default groups
1 parent 78f039d commit 4085aed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

serializer.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,18 @@ stored in one of the following locations:
383383
* All ``*.yaml`` and ``*.xml`` files in the ``Resources/config/serialization/``
384384
directory of a bundle.
385385

386+
.. note::
387+
388+
By default, the ``Default`` group is used when normalizing and denormalizing
389+
objects. A group corresponding to the class name is also used. For example,
390+
if you are normalizing a ``App\Entity\Product`` object, the ``Product`` group
391+
is also included by default.
392+
393+
.. versionadded:: 7.1
394+
395+
The default use of the class name and ``Default`` groups when normalizing
396+
and denormalizing objects was introduced in Symfony 7.1.
397+
386398
.. _serializer-enabling-metadata-cache:
387399

388400
Using Nested Attributes

0 commit comments

Comments
 (0)
0