-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Use array_diff_key to get diff for new or deleted documents #2388
Use array_diff_key to get diff for new or deleted documents #2388
Conversation
@pepeh thanks for reporting and solving the problem. Can you add some tests to verify the new behaviour? Please also run |
@IonBazan Thank you. I have fixed code style. We already have test cases |
lib/Doctrine/ODM/MongoDB/PersistentCollection/PersistentCollectionTrait.php
Outdated
Show resolved
Hide resolved
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.
IIRC the is_object
check could come from some ooold times when PersistentCollection was meant to be used with other collection thingies. As it's only used for holding objects I think it's safe to drop it (but I'm still in vacation mode so I might be wrong 👼)
All in all, the change looks good to me 👍
Thank you @pepeh! ❤️ |
Summary
Avoid of array_udiff usage for getDeletedDocuments and getInsertedDocuments functions