According to [1] running
bin/cake upgrade rector --rules phpunit80 <path/to/app/tests>
throws
Fatal error: PHPStan\Analyser\MutatingScope cannot implement PHPStan\Analyser\Scope - it is not an interface in phar:///usr/src/myapp/upgrade/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php on line 87
Extracting and looking into the phpstan.phar it shows:
// Scope.php
interface Scope extends \PHPStan\Reflection\ClassMemberAccessAnswerer
// MutatingScope.php line 87
class MutatingScope implements \PHPStan\Analyser\Scope
Tried on two different installations (PHP 7.3 and 7.4). Any ideas?
[1] https://book.cakephp.org/4/en/appendices/4-0-upgrade-guide.html