Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Serializer] Add docs for attributes context key#8830
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
components/serializer.rst Outdated
| $serializer = new Serializer(array(new ObjectNormalizer())); | ||
| $data = $serializer->normalize($user, null, array('attributes' => array('familyName', 'company' => ['name']))); | ||
| // $data = array('familyName' => 'Dunglas', 'company' => ['name' => 'Les-Tilleuls.coop']); |
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.
'company' => ['name' ... ->'company' => array('name' ...
components/serializer.rst Outdated
| Only attributes that are not ignored (see below) are available. | ||
| If some serialization groups are set, only attributes allowed by those groups can be used. | ||
| As for groups, attributes can be applied during both the serialization and deserialization. |
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.
I don't understand what this phrase means -> "As for groups, attributes can be applied during both the serialization and deserialization."
javiereguiluz left a comment
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.
Perfectly explained, concise and with a good example.
Thank you!
weaverryan commentedDec 13, 2017
Thanks@dunglas! |
…as, javiereguiluz)This PR was merged into the 3.3 branch.Discussion----------[Serializer] Add docs for attributes context keyDocumentation forsymfony/symfony#18834Commits-------d48d6d4 Minor rewordea211ab Review5d75696 [Serializer] Add docs for attributes context key
Documentation forsymfony/symfony#18834