Skip to content

Update serializer.rst #18273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

alirezarahmani
Copy link
Contributor

Constant 'ISO8601' is deprecated

This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.

Constant 'ISO8601' is deprecated

This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead.
@carsonbot carsonbot added this to the 6.3 milestone May 2, 2023
@@ -724,7 +724,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) : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected output L746 must also be updated to 2014-03-22T09:43:12-05:00

@wouterj
Copy link
Member

wouterj commented Dec 7, 2024

Hi @alirezarahmani! Sorry for missing this contribution. In the meantime, we've rewritten the serializer documentation and I see we no longer mention ISO 8601 anywhere, so I'm going to close this one.

@wouterj wouterj closed this Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants