Skip to content

Conversation

schlndh
Copy link
Contributor

@schlndh schlndh commented Jul 14, 2023

There is a bug in how access to uninitialized properties is reported. If the access is in a trait it was reported as being in the class, but the line number was from the trait, so it didn't make sense. This is an attempt to fix it so that the trait access gets reported similarly to other trait issues (i.e. trait (in context of class)).

@schlndh schlndh force-pushed the fix-reportTraitAccessToUninitializedProperties branch from fbf34b6 to 1095687 Compare July 14, 2023 11:35
@schlndh schlndh force-pushed the fix-reportTraitAccessToUninitializedProperties branch from 1095687 to 342c75f Compare July 14, 2023 11:38
@ondrejmirtes
Copy link
Member

Nice, thank you!

@ondrejmirtes ondrejmirtes merged commit 098b0c0 into phpstan:1.10.x Jul 20, 2023
@schlndh schlndh deleted the fix-reportTraitAccessToUninitializedProperties branch July 20, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants