-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[VarExporter] Improve error message for Lazy Ghosts failing reinitializing classes due to readonly properties #57067
Conversation
Include exception class and expand error message
Hey! Thanks for your PR. You are targeting branch "7.2" but it seems your PR description refers to branch "7.1". Cheers! Carsonbot |
I really shouldn't code in the web IDE
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.
Testeable ?
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
Would boil down to a convoluted test case just for a stringwise comparison on the error message. Not worth it imo since it can't break anything. |
Definitely worth it because we're parsing an error message emitted by the PHP runtime and the PHP folks are infamous for applying subtle changes to their error messages in minor releases. |
But why... 🤦 I'll see if I can whip something up. |
Couldn't quickly build a reliable unit test in a reasonable time, far too busy to really try for just an error message. |
As discussed in #54228, Lazy Ghosts cannot reinitialize classes with
readonly
properties due to PHP limitations. Currently, this will often lead to a vague crash minutes or even hours later stating only:This PR improves the error message to: