phpstan / phpstan-phpunit

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

Add an option to check for non static dataprovider even without deprecation rules #162

Closed VincentLanglet closed 1 year ago

VincentLanglet commented 1 year ago

I saw https://github.com/phpstan/phpstan-phpunit/pull/151 was added by @villfa to check for non static data provider. But I don't have the check on my project.

If I understand correctly, it's only active if https://github.com/phpstan/phpstan-deprecation-rules is installed. But I'd like to have this rule even if I don't use the deprecation-rules package.

Currently stricter analysis (https://phpstan.org/config-reference#stricter-analysis) with PHPStan is possible

I'd like the same for the non-static check, ie: a config option to enable this rules (which would be automatically set to true if https://github.com/phpstan/phpstan-deprecation-rules is installed).

Is it possible ? Is it already possible and I miss something ?

Thanks

ondrejmirtes commented 1 year ago

It's a deprecation -> use the deprecation-rules package. I don't see why not.