File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,14 @@ There are several types of normalizers available:
737737 :phpclass: `DateTime ` and :phpclass: `DateTimeImmutable `) into strings.
738738 By default, it uses the `RFC3339 `_ format.
739739
740+ :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeZoneNormalizer `
741+ This normalizer converts :phpclass: `DateTimeZone ` objects into strings that
742+ represent the name of the timezone according to the `list of PHP timezones `_.
743+
744+ .. versionadded :: 4.3
745+
746+ The ``DateTimeZoneNormalizer `` was introduced in Symfony 4.3.
747+
740748:class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DataUriNormalizer `
741749 This normalizer converts :phpclass: `SplFileInfo ` objects into a data URI
742750 string (``data:... ``) such that files can be embedded into serialized data.
@@ -1500,3 +1508,4 @@ Learn more
15001508.. _`RFC 7807` : https://tools.ietf.org/html/rfc7807
15011509.. _`Value Objects` : https://en.wikipedia.org/wiki/Value_object
15021510.. _`API Platform` : https://api-platform.com
1511+ .. _`list of PHP timezones` : https://www.php.net/manual/en/timezones.php
Original file line number Diff line number Diff line change @@ -61,13 +61,19 @@ As well as the following normalizers:
6161 handle typical data objects
6262* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeNormalizer ` for
6363 objects implementing the :phpclass: `DateTimeInterface ` interface
64+ * :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DateTimeZoneNormalizer ` for
65+ :phpclass: `DateTimeZone ` objects
6466* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ DataUriNormalizer ` to
6567 transform :phpclass: `SplFileInfo ` objects in `Data URIs `_
6668* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ JsonSerializableNormalizer `
6769 to deal with objects implementing the :phpclass: `JsonSerializable ` interface
6870* :class: `Symfony\\ Component\\ Serializer\\ Normalizer\\ ArrayDenormalizer ` to
6971 denormalize arrays of objects using a format like `MyObject[] ` (note the `[] ` suffix)
7072
73+ .. versionadded :: 4.3
74+
75+ The ``DateTimeZoneNormalizer `` was introduced in Symfony 4.3.
76+
7177Custom normalizers and/or encoders can also be loaded by tagging them as
7278:ref: `serializer.normalizer <reference-dic-tags-serializer-normalizer >` and
7379:ref: `serializer.encoder <reference-dic-tags-serializer-encoder >`. It's also
You can’t perform that action at this time.
0 commit comments