Skip to content
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

[PropertyAccess][DX] Improved errors when reading uninitialized properties #36073

Merged

Conversation

HeahDude
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? kinda
New feature? no
Deprecations? no
Tickets Fix #36051
License MIT
Doc PR ~

An attempt to fix #36051 by providing better error messages when trying to read uninitialized properties either via calling a return-type-hinted method from PHP 7.0 or by accessing public-typed properties from PHP 7.4.

It would be nice to have a proper exception class in master.

@HeahDude HeahDude force-pushed the property_access-better-uninitialized_errors branch 2 times, most recently from f947dc5 to 4d65001 Compare March 14, 2020 17:42
@HeahDude HeahDude changed the title [PropertyAccess] Improved errors when reading uninitialized properties [PropertyAccess][DX] Improved errors when reading uninitialized properties Mar 14, 2020
@HeahDude
Copy link
Contributor Author

This diff should better be reviewed without whitespace changes.

@HeahDude HeahDude force-pushed the property_access-better-uninitialized_errors branch 2 times, most recently from 63b6c72 to 080500d Compare March 15, 2020 13:23
@HeahDude HeahDude force-pushed the property_access-better-uninitialized_errors branch from 080500d to a71023b Compare March 15, 2020 13:27
@fabpot
Copy link
Member

fabpot commented Mar 16, 2020

Thank you @HeahDude.

@fabpot fabpot merged commit 2c4c19c into symfony:3.4 Mar 16, 2020
@HeahDude HeahDude deleted the property_access-better-uninitialized_errors branch March 16, 2020 18:02
fabpot added a commit that referenced this pull request Mar 18, 2020
…ception` (HeahDude)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[PropertyAccess][DX] Added an `UninitializedPropertyException`

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | ~
| License       | MIT
| Doc PR        | TODO

Feature version of #36073 for master. Again, better be reviewed without whitespace changes, thanks!

Commits
-------

2b2fd12 [PropertyAccess] Added an `UninitializedPropertyException`
This was referenced Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants