We have phpstan & rector installed with dev-main, and when we run rector process --dry-run we get the error:
Could not process "xxx.php" file, due to: "Call to undefined method PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getParamImmediatelyInvokedCallableTagValues()". On line: 307
These are the versions in the lock file:
- phpstan/phpstan: 1.11.1
- phpstan/phpdoc-parser: 1.29.0
- rector/rector: 0.19.8
This is our rector config:
<?php
declare(strict_types=1);
use craft\rector\SetList as CraftSetList;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/modules',
]);
$rectorConfig->sets([
CraftSetList::CRAFT_CMS_40,
LevelSetList::UP_TO_PHP_83,
SetList::TYPE_DECLARATION,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
]);
$rectorConfig->rule(ChangeSwitchToMatchRector::class);
};