- Issue created by @mstrelan
Amongst the "new" errors found when running PHPStan on level 2 is: Cannot call method Foo() on Bar.
This child-issue exists to fix all of those that are related to Prophecy. Note that adding jangregor/phpstan-prophecy will resolve some of these, but not all of them.
./vendor/bin/phpstan analyse -c core/phpstan.neon.dist --error-format=raw --level=2 | sed "s|$PWD/||" | grep -P 'Cannot call method ((expects|shouldBeCalled|shouldNotBeCalled|shouldHaveBeenCalled|will|willReturn|willThrow)\(\))'
- Solve all of the the above mentioned reported errors.
- Run PHPStan on level 2 and don't see the above mentioned error any more.