phpstan/phpstan-phpunit

prophesize deprecation error when using traits

Fabex opened this issue · 2 comments

Fabex commented

Hi,
I don't know if it's the right repo, but since the last phpunit/phpunit version (9.5.26)
even if we use the Prophecy\PhpUnit\ProphecyTrait, to use the prophesize, phpstan raise an error about

Call to deprecated method prophesize() of class Class\Name:  
         https://github.com/sebastianbergmann/phpunit/issues/4141

This is because in 9.5.26, phpunit maintainers add a deprecation docbloc.

And after some search phpstan use reflection to read the docbloc for deprecation, and so like our tests extends TestCase, even if we use the Traits, phpstan don't follow the traits but the inheritance.

I hope my issue is clear enough, and you could fix this issue.

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.