Skip to content

Commit

Permalink
minor symfony#19972 [Serializer] Replace deprecated ISO8601 with Atom…
Browse files Browse the repository at this point in the history
… (andreybolonin)

This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead.

Discussion
----------

[Serializer] Replace deprecated ISO8601 with Atom

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `7.x` for features of unreleased versions).

-->

Commits
-------

a21ac0c Update serializer.rst
  • Loading branch information
javiereguiluz committed Jun 18, 2024
2 parents 4511703 + a21ac0c commit 6edffcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ When serializing, you can set a callback to format a specific object property::

// all callback parameters are optional (you can omit the ones you don't use)
$dateCallback = function ($innerObject, $outerObject, string $attributeName, ?string $format = null, array $context = []) {
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ATOM) : '';
};

$defaultContext = [
Expand Down

0 comments on commit 6edffcb

Please sign in to comment.