Skip to content

Commit 6edffcb

Browse files
committed
minor #19972 [Serializer] Replace deprecated ISO8601 with Atom (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
2 parents 4511703 + a21ac0c commit 6edffcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/serializer.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ When serializing, you can set a callback to format a specific object property::
799799

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

805805
$defaultContext = [

0 commit comments

Comments
 (0)