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

Use trait properties in uninitialized props checks #1340

Merged

Conversation

herndlm
Copy link
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
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