We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58d4112 commit 369ea13Copy full SHA for 369ea13
serializer.rst
@@ -115,6 +115,12 @@ Custom normalizers and/or encoders can also be loaded by tagging them as
115
:ref:`serializer.encoder <reference-dic-tags-serializer-encoder>`. It's also
116
possible to set the priority of the tag in order to decide the matching order.
117
118
+.. caution::
119
+
120
+ Always make sure to load the ``DateTimeNormalizer`` when serializing the
121
+ ``DateTime`` or ``DateTimeImmutable`` classes to avoid excessive memory
122
+ usage and exposing internal details.
123
124
Here is an example on how to load the
125
:class:`Symfony\\Component\\Serializer\\Normalizer\\GetSetMethodNormalizer`, a
126
faster alternative to the `ObjectNormalizer` when data objects always use
0 commit comments