Skip to content

Commit 5e789fa

Browse files
committed
add caution for datetime object
1 parent 58d4112 commit 5e789fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

serializer.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ properties and setters (``setXxx()``) to change properties:
164164
introduced in Symfony 3.4. In previous Symfony versions only getters (``getXxx()``)
165165
and issers (``isXxx()``) were supported.
166166

167+
.. caution::
168+
169+
Be aware that the use the ``GetSetMethodNormalizer``, without the ``DateTimeZoneNormalizer`` for normalize object
170+
``DateTimeInterface``, increase the memory use of PHP. Because the ``Datetime`` class has getters, the
171+
``GetSetMethodNormalizer`` will just normalize the ``Datetime`` object.
172+
167173
.. _serializer-using-serialization-groups-annotations:
168174

169175
Using Serialization Groups Annotations

0 commit comments

Comments
 (0)