Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
ostrolucky commentedMay 24, 2022
I don't know, sorry. |
nicolas-grekas commentedMay 24, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
stof commentedMay 24, 2022
To me, the best solution for that would be to implement |
nicolas-grekas commentedMay 24, 2022
142ecc1 to1dbf3a6Comparenicolas-grekas commentedMay 24, 2022
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. |
fabpot commentedMay 27, 2022
Thank you@nicolas-grekas. |
Uh oh!
There was an error while loading.Please reload this page.
Paving the way to#35345
Interface
GhostObjectInterfaceextendsLazyLoadingInterfacebut 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?