Skip to content
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

Fix wrong initialisation of proxies with public properties #2082

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Oct 8, 2019

Q A
Type bug
BC Break no
Fixed issues Fixes #2080

Summary

This fixes an issue where hydrating a proxy object will not initialise any properties that aren't passed to the hydrator. With this fix, we invoke proxy initialisation with an empty initialiser so we initialise an empty object before adding any data.

@alcaeus alcaeus added the Bug label Oct 8, 2019
@alcaeus alcaeus self-assigned this Oct 8, 2019
@alcaeus alcaeus added this to the 2.0.1 milestone Oct 8, 2019
@alcaeus alcaeus requested a review from Ocramius October 8, 2019 18:17
@Frederick888
Copy link

Thanks for the fix! And it'd be nice if these changes can land in release asap since it's blocking my upgrade process :P

@alcaeus alcaeus changed the base branch from master to 2.0.x October 9, 2019 06:29
@alcaeus alcaeus force-pushed the fix-wrong-proxy-initialisation branch from 0ecbd08 to 6395ff4 Compare October 9, 2019 06:30
@malarzm
Copy link
Member

malarzm commented Oct 9, 2019

Thanks @alcaeus!

@malarzm malarzm merged commit 520914c into doctrine:2.0.x Oct 9, 2019
@alcaeus alcaeus deleted the fix-wrong-proxy-initialisation branch October 9, 2019 07:09
@alcaeus
Copy link
Member Author

alcaeus commented Oct 9, 2019

And it'd be nice if these changes can land in release asap since it's blocking my upgrade process :P

2.0.1 has been released: https://github.com/doctrine/mongodb-odm/releases/tag/2.0.1

@Frederick888
Copy link

@alcaeus Thanks for the release!
Btw do you think the test I put together is still worth merging here, or the updated HydratorTest.php already gets it covered (so I don't need to bother cleaning up my test case, either lol)?

@alcaeus
Copy link
Member Author

alcaeus commented Oct 10, 2019

From what I can see the test I added covers yours, so you don't need to bother cleaning it up ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants