Skip to content

Commit

Permalink
bug #6552 Typo fix in the Serializer deserialization example for exis…
Browse files Browse the repository at this point in the history
…ting object (fre5h)

This PR was merged into the 2.7 branch.

Discussion
----------

Typo fix in the Serializer deserialization example for existing object

| Q              | A
| ------------- | ---
| Doc fix?          | yes
| New docs?     | no
| Applies to       | 2.7+
| Fixed tickets   | N/A

Just found a small typo in the comment with result values of deserialization. As the init value of the `age` of the `person` is 99, then after deserializing the existing `person` object it is 69. But in comment it is still 99 `// $jsonContent contains {"name":"foo","age":99,"sportsman":false}`

Commits
-------

44ecd19 Typo fix in the Serializer deserialization example
  • Loading branch information
wouterj committed May 13, 2016
2 parents 3f9e578 + 44ecd19 commit efdde04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ The serializer can also be used to update an existing object::
EOF;

$serializer->deserialize($data, 'Acme\Person', 'xml', array('object_to_populate' => $person));
// $obj2 = Acme\Person(name: 'foo', age: '99', sportsman: true)
// $obj2 = Acme\Person(name: 'foo', age: '69', sportsman: true)

This is a common need when working with an ORM.

Expand Down

0 comments on commit efdde04

Please sign in to comment.