Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] Unset object_to_populate after using it #17281

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 2 commits into from

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Jan 6, 2016

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

The object_to_populate key must be unset after using it to avoid problems when normalizing sub objects. Needed for #17193.

@@ -279,7 +279,7 @@ protected function prepareForDenormalization($data)
* Instantiates an object using constructor parameters when needed.
*
* This method also allows to denormalize data into an existing object if
* it is present in the context with the object_to_populate key.
* it is present in the context with the object_to_populate key then remove this key.
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence doesn't sound right anymore.

Copy link
Member Author

Choose a reason for hiding this comment

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

PHPDoc updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Better 👍

@fabpot
Copy link
Member

fabpot commented Jan 12, 2016

should be merged in 2.7, right?

@dunglas
Copy link
Member Author

dunglas commented Jan 12, 2016

Yes

@fabpot
Copy link
Member

fabpot commented Jan 12, 2016

Thank you @dunglas.

fabpot added a commit that referenced this pull request Jan 12, 2016
…nglas)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #17281).

Discussion
----------

[Serializer] Unset object_to_populate after using it

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The `object_to_populate` key must be unset after using it to avoid problems when normalizing sub objects. Needed for #17193.

Commits
-------

ff18b68 [Serializer] Unset object_to_populate after using it
@dunglas dunglas closed this Jan 12, 2016
@dunglas dunglas deleted the unset_obj_to_pop branch January 12, 2016 21:28
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