-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarExporter] Cannot generate lazy ghost: property XXXX is final or private(set) #60333
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
Comments
What the error says: this is not possible, unless you use PHP 8.4 |
Using 8.4 with native lazy ghosts of course! |
I use php 8.4. what did I miss? |
You have to use native lazy objects. |
Actually, the issue is in doctrine. I made a very simple reproducer, but I have such code in my entity. I fail to see why it works without hook, but it does not with. More over, I have not |
That's how hooks have been designed. You have to enable native lazy objects for Doctrine (not sure it's been released yet) |
Symfony version(s) affected
7.3 (maybe older too)
Description
I'm playing with property hook from PHP 8.4, and VarExporter component is not able to process my code.
I use a backed property, with a private(set) modifier, and a hook. This blocks the VarExporter to generate a ghost object.
I'm not sure how I could solve this, except by changing the visibility. And I fail to see why the hook change everything 🤔
How to reproduce
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: