Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[PropertyAccess] Fix handling of uninitialized property of anonymous class#44983
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedJan 11, 2022
It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you. Cheers! Carsonbot |
filiplikavcan commentedJan 11, 2022 • 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.
Hm, the failing integration test does not seem to be related to the changes in this PR. Can somebody help me with that if it is related? |
carsonbot commentedJan 12, 2022
Hey! I think@HeahDude has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
nicolas-grekas commentedJan 12, 2022
Thanks for the PR. Continued in#44983. |
… anonymous class (filiplikavcan)This PR was merged into the 4.4 branch.Discussion----------[PropertyAccess] Fix handling of uninitialized property of anonymous class| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#44983| License | MIT| Doc PR | -Commits-------27d5edf [PropertyAccess] Fix handling of uninitialized property of anonymous class
Uh oh!
There was an error while loading.Please reload this page.
Expected
Throws
UninitializedPropertyExceptionwith message "The property "class@anonymous::$uninitialized" is not readable because it is typed "string". You should initialize it or declare a default value instead.".Actual
Throws
Errorwith message "Typed property class@anonymous::$publication must not be accessed before initialization".Side efect
Form with data of an anonymous class instance cannot be created. This code throws "Typed property class@anonymous::$name must not be accessed before initialization":
This works as expected:
No exception is thrown because PropertyPathAccessor catches UninitializedPropertyException and returns null instead.