Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ There are several types of normalizers available:
calling the constructor during the denormalization process.

Objects are normalized to a map of property names (method name stripped of
the "get"/"set"/"has"/"remove" prefix and converted to lower case) to property
Copy link
Member

@dunglas dunglas Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first letter is lower cased (getFoo -> foo), my sentence was unclear, indeed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So may I suggest: "Objects are normalized to a map of property names (method name stripped of the "get"/"set"/"has"/"remove" prefix and first letter converted to lower case) ..."

the "get"/"set"/"has"/"remove" prefix) to property
values.

The ``ObjectNormalizer`` is the most powerful normalizer. It is configured by
Expand All @@ -524,7 +524,7 @@ There are several types of normalizers available:
the constructor and the "setters" (public methods starting with "set").

Objects are normalized to a map of property names (method name stripped of
the "get" prefix and converted to lower case) to property values.
the "get" prefix) to property values.

:class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`
This normalizer directly reads and writes public properties as well as
Expand Down Expand Up @@ -595,7 +595,8 @@ Circular references are common when dealing with entity relations::
}

To avoid infinite loops, :class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`
throws a :class:`Symfony\\Component\\Serializer\\Exception\\CircularReferenceException`
or :class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer`
throw a :class:`Symfony\\Component\\Serializer\\Exception\\CircularReferenceException`
when such a case is encountered::

$member = new Member();
Expand Down