Skip to content

Fixed double reporting of promoted properties.#1533

Merged
ondrejmirtes merged 2 commits intophpstan:1.8.xfrom
mad-briller:fix.promoted-property-double-reporting
Jul 23, 2022
Merged

Fixed double reporting of promoted properties.#1533
ondrejmirtes merged 2 commits intophpstan:1.8.xfrom
mad-briller:fix.promoted-property-double-reporting

Conversation

@mad-briller
Copy link
Copy Markdown
Contributor

fixes phpstan/phpstan#7662

this could be a bit heavy handed, but my rationale is that the MissingPropertyTypehintRule will not surface anything that the MissingMethodParameterTypehintRule wont when analyzing promoted property definitions.

@mad-briller mad-briller marked this pull request as draft July 20, 2022 20:35
@mad-briller mad-briller marked this pull request as ready for review July 20, 2022 20:36
@ondrejmirtes
Copy link
Copy Markdown
Member

Perfect, this makes sense. Could you add a test for a promoted parameter in MissingMethodParameterTypehintRule just to be sure it's reported? Thanks.

@mad-briller
Copy link
Copy Markdown
Contributor Author

added that testcase @ondrejmirtes

@mad-briller mad-briller force-pushed the fix.promoted-property-double-reporting branch from b2770a8 to a66d96f Compare July 22, 2022 15:59
@ondrejmirtes ondrejmirtes merged commit 52f6529 into phpstan:1.8.x Jul 23, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

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.

The same issue with no type specified reported twice using promoted properties

2 participants