Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[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
[Serializer] add documentation for serializer callbacks#3701
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
remove theneeds
There was a problem hiding this comment.
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 [...]
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 [...]"
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
with
I like it, great work Luis! |
… (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
relatedsymfony/symfony#10229
Sent usingGush