-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: non-managed properties should trigger proxy load #11606
Conversation
I need some input from maintainers. The change breaks a lot of tests. the problem is that accessing test properties ( Maybe introduce a magic prefix like |
@nicolas-grekas hi! Can you help with this? I think you will have more insight. |
I guess we should close as duplicate of #11544 first, then continue on that other issue. |
closing in favor of #11544 |
After the move to lazy ghost, properties not managed by Doctrine no longer trigger proxy initialization.
This new behavior impacts things like file uploads that rely on
postLoad
event handler. Accessing a file upload property does not trigger the load, so the upload property is incorrectly null, unless the consumer first triggers the load by accessing another property first (or explicitly call__load
).This PR restores the behavior of legacy proxy, and should resolve the aforementioned issue.