-
-
Notifications
You must be signed in to change notification settings - Fork 88
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 Doctrine source iterators #380
Fix Doctrine source iterators #380
Conversation
@VincentLanglet Please confirm you just lost this but did not remove this intentionally |
Wasn't intentional indeed, since I don't even know what it does. |
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.
Oh.
I just see that the method detach is deprecated
@deprecated 2.7 This method is being removed from the ORM and won't have any replacement
Maybe it's the reason I removed it (?).
@greg0ire any opnion on this ?
Let's just remove all deprecated method calls but not replace them with correct functions 🤣 |
Correct function which is ? |
@VincentLanglet @franmomu Actually I've just reverted changes which breack BC but if you want I'll apply your requested changes |
The request change for the Document manager seems easy to apply and avoid using an internal method. I don't know how hard would be the request change for entityManager
|
4c91505
to
5da5763
Compare
I've replaced |
To be honest, I'm not sure about this. I guess there won't be memory leaks, but maybe we are introducing some problems performance-wise. Based on how Doctrine shows how to to batch processing, the calls to So IMHO, if we don't have enough knowledge about this, I would leave as it was and just replace the call to the |
Indeed, maybe it's safer to use
for ODM And keep
for ORM until we get some help to remove the deprecated method (maybe @greg0ire you can help us ?) |
Actually the calling I also think that using deprecated functions is acceptable as opposed to internal ones because BC is guaranteed here. So we can just using |
After reading that conversation, I think this PR looks fine and
|
IIUC, if we detach an object from the UoW (by calling |
You're right, but that was the previous behavior anyway. |
I didn't know we were detaching objects. |
@franmomu please review |
Thanks @ossinkine! |
@VincentLanglet @greg0ire Could anyone from you guys create a release with this fix please? |
Sure, the PR is opened #386 |
Subject
I am targeting this branch, because I've faced with BC break.
After refactoring source iterators here #343 there was lost detaching objects from object managers what led to memory leaks.
Changelog