Skip to content

Use trait properties in uninitialized props checks#1340

Merged
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
herndlm:trait-props-in-class-statements-gatherer
May 23, 2022
Merged

Use trait properties in uninitialized props checks#1340
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
herndlm:trait-props-in-class-statements-gatherer

Conversation

@herndlm
Copy link
Copy Markdown
Contributor

@herndlm herndlm commented May 22, 2022

Closes phpstan/phpstan#7219

Less invasive approach of #1339

Open question: is the error message fine like that, what if the trait and class are in different files? Was there already a special way of dealing with this or is it dealt with already?

@ondrejmirtes
Copy link
Copy Markdown
Member

Open question: is the error message fine like that, what if the trait and class are in different files? Was there already a special way of dealing with this or is it dealt with already?

It's obvious from the output, the file path is something like FooTrait.php (in context of class Bar).

@herndlm herndlm marked this pull request as ready for review May 23, 2022 07:28
@ondrejmirtes ondrejmirtes merged commit 2ab0484 into phpstan:1.7.x May 23, 2022
@herndlm herndlm deleted the trait-props-in-class-statements-gatherer branch May 23, 2022 07:31
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.

Typed properties not showed error when in Traits

2 participants