-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
@@ -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. |
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.
This sentence doesn't sound right anymore.
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.
PHPDoc updated.
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.
Better 👍
should be merged in 2.7, right? |
Yes |
Thank you @dunglas. |
…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
The
object_to_populate
key must be unset after using it to avoid problems when normalizing sub objects. Needed for #17193.