-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DoctrineBridge] Don't reinit managers when they are proxied as ghost objects #46443
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
I don't know, sorry. |
|
To me, the best solution for that would be to implement |
142ecc1
to
1dbf3a6
Compare
I updated the PR to throw instead of ignoring. This shouldn't happen in practice since we don't generate ghost object proxies, but let's merge as a defensive measure. |
Thank you @nicolas-grekas. |
Paving the way to #35345
Interface
GhostObjectInterface
extendsLazyLoadingInterface
but breaks LSP becausesetProxyInitializer()
takes another kind of closure as argument.This won't solve #35216 since resetting a closed entity manager won't happen anymore if we start to use ghost object proxies. But at least this code won't explode.
/cc @ostrolucky any idea what we could put inside the added "if" to solve #35216? Would you be up to submit a PR doing that, branch 6.2 I guess since that'd be a new feature?