-
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
[GH-8471] Undeprecate PARTIAL for objects in DQL #11653
[GH-8471] Undeprecate PARTIAL for objects in DQL #11653
Conversation
Shouldn't it be "Revert deprecation of" or "Undeprecate" though? |
first access. This is possible in Java, for example, through | ||
bytecode instrumentation. In PHP though this is not possible, so | ||
there is no way to have "secure" partial objects in an ORM with | ||
transparent persistence. |
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.
Is this sentence still true? Or should we say it's not implemented yet?
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.
Its still true until we get lazy objects.
Co-authored-by: Grégoire Paris <[email protected]>
With this PR SELECT PARTIAL p.{} is allowed again with object hydration. It was already re-allowed for array-hydration a few commits before.
The reason we want to allow this again is that PHP 8.4 Lazy Proxies will allow us to implement partial objects as proxies that will trigger lazy initialization as soon as one of the "not loaded" partial properties is accessed.
Related: