Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[VarExporter] Leverage native lazy objects#59890
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
ae65a7a
to3b27972
Compare0bbd405
to7badfb5
Compare This comment was marked as outdated.
This comment was marked as outdated.
9852544
to1d14933
Compare1d14933
toaaf3d4a
Comparenicolas-grekas commentedMar 15, 2025 • 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.
Self-review:
Status: needs work |
Be careful. Doctrine ORM 2.x is not EOL yet and it already supports using var-exporter (but will probably not receive a backport of the support for native lazy objects). This might impact the deprecation plan. |
6b9b1fd
toe382b2f
Compare
I don't think this should impact us: ppl have a way to fix the deprecation: upgrade. The day where 2.x will be EOLed is close anyway. After many error-n-trial, I just pushed what I think is the implementation that works. First I thought we could use hooks to proxy all properties, but it happens those are not really compatible with references, so that we have to keep using magic accessors to proxy them. Status: needs review |
e382b2f
to3c5d516
Compare3c5d516
toa00855a
Compare4bcf132
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Let's leverage native lazy objects.
Instead of keeping/updating LazyGhostTrait and LazyProxyTrait, I'm deprecating them in favor of using native lazy proxies directly.
There is one use case that is not covered by native lazy objects: lazy decorators - aka lazy proxies built against an interface or an internal class. For this use case, we keep
ProxyHelper::generateLazyProxy()
.