Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Serializer] add documentation for serializer callbacks#3701

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

cordoval
Copy link
Contributor

relatedsymfony/symfony#10229

QA
Doc fix?no
New docs?yes
Applies to2.3+
Fixed ticketsself 👶
LicenseCC-ASA 3.0 Unported

Sent usingGush

@cordoval
Copy link
ContributorAuthor

you may cook/grill me now@wouterj@weaverryan 👶

Using Callbacks to Serialize DateTime Objects
---------------------------------------------

If you have DateTime type fields or need special formatting needs when deserializing
Copy link
Member

Choose a reason for hiding this comment

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

remove theneeds

Copy link
Member

Choose a reason for hiding this comment

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

If you use the datetime field type [...]

Copy link
Member

Choose a reason for hiding this comment

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

Btw, I don't like mentioning something from the Form component docs into the Serializer component docs

Copy link
Member

Choose a reason for hiding this comment

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

oh, wait. Now I see what you mean by "type fields". Just use "If a property of an object contains a DateTime instance or [...]"

Copy link
Member

Choose a reason for hiding this comment

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

hmm, now I think more about it, we should just remove the complete DateTime thing from this section and only use it in the code example.

@@ -181,6 +181,37 @@ method on the normalizer definition::
As a final result, the deserializer uses the ``first_name`` attribute as if
it were ``firstName`` and uses the ``getFirstName`` and ``setFirstName`` methods.

Using Callbacks to Serialize Properties With Object Instances
Copy link
Member

Choose a reason for hiding this comment

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

with

@weaverryan
Copy link
Member

I like it, great work Luis!

weaverryan added a commit that referenced this pull requestApr 2, 2014
… (cordoval)This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#3701).Discussion----------[Serializer] add documentation for serializer callbacksrelatedsymfony/symfony#10229| Q             | A                   || ---           | ---                 || Doc fix?      | no                  || New docs?     | yes                 || Applies to    | 2.3+                || Fixed tickets | self 👶      || License       | CC-ASA 3.0 Unported | Sent using [Gush](https://github.com/gushphp/gush)Commits-------b865b40 add comma madness and lowercasing Wefe2029 plug new revisioneabdbd0 add serializer set callback documentation
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@cordoval@weaverryan@wouterj@xabbuh

[8]ページ先頭

©2009-2025 Movatter.jp