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] dump default value for property hooks if present#60288
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
Merged
+3 −1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
fabpot approved these changesMay 2, 2025
Thank you@xabbuh. |
b5b27a8
intosymfony:6.4 11 checks passed
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas added a commit that referenced this pull requestMay 14, 2025
…with property hooks (cheack)This PR was submitted for the 7.3 branch but it was merged into the 6.4 branch instead.Discussion----------[VarExporter] Fixed lazy-loading ghost objects generation with property hooks| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| License | MITFixed the bug introduced in#60288.If the type is boolean:```phppublic bool $property = false { set { ... }}```an empty string is exported:```phppublic bool $property = { ...}```which leads to `ParseError: syntax error, unexpected token "{"` error.Commits-------0c71a93 Fixed lazy-loading ghost objects generation with property hooks with default values.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test added in#60258 reveals that we have another bug in our lazy ghost generation logic which leads to an error at runtime when a hook tries to read the property's default value.