phpstan / phpstan-phpunit

PHPUnit extensions and rules for PHPStan
MIT License
468 stars 46 forks source link

Usage of a method in the @dataProvider docblock is not being recognized #172

Closed MetalArend closed 1 year ago

MetalArend commented 1 year ago

Versions:

I get the error Method xxx is unused. in PHPStan Pro, while the method is being used in the @dataProvider. I'm not entirely sure the phpstan-phpunit plugin is actually being loaded in the PHPStan editor, but it is the exact same issue.

Should this work, or am I supposed to tell PHPStan to not bother about it?

https://phpstan.org/r/54b2df28-60c6-4e12-bd0d-add9835ef91b

ondrejmirtes commented 1 year ago

Data provider must be public and static. See: https://github.com/sebastianbergmann/phpunit/issues/5115

MetalArend commented 1 year ago

Oh man, thanks for being so cool about me wasting your time like this. Thanks!

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.