Bruce Weirdan
Bruce Weirdan
I'm curious what would happen if it does?
It's doable (the plugin already suppresses `MissingConstructor`), but I'm wondering whether people would complain about false-negatives :thinking:
> it seems like the translation from setUp to __construct isn't really working as expected thinking It seems it's much easier than that - Psalm just doesn't trigger `afterCodebasePopulated` in...
Are you referring to methods in test case classes?
> unless you think it'd be "better"to suppress all `PossiblyUnusedMethod` for test & data provider methods Yep, that was my idea (as well as automatically suppressing `MissingConstructor`). The problem with...
Well, that looks feasible. But then, it sounds pretty generic, so why limit it to tests only? Could be a plugin of its own.
> ah, I get what you mean now- it's more than just phpunit generates coverage files :P Not just that. It may be used to clean up some false-positives from...
> as well as automatically suppressing `MissingConstructor` Implemented that in #14
@SignpostMarv can you provide isolated, short and concise test showing false-positive `*UnusedMethod`? Ideally something I can add in a Gherkin test like here: https://github.com/psalm/phpunit-psalm-plugin/blob/master/tests/acceptance/TestCase.feature
I still think this would be better done as a separate plugin. You would need to hook into, say, [AfterCodebasePopulated](https://github.com/vimeo/psalm/blob/master/src/Psalm/Plugin/Hook/AfterCodebasePopulatedInterface.php), read the coverage xml file and then mark methods as...