phpstan / phpdoc-parser

Next-gen phpDoc parser with support for intersection types and generics
MIT License
1.36k stars 61 forks source link

Rector error: Call to undefined method PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getParamImmediatelyInvokedCallableTagValues() #242

Closed WHITE-developer closed 6 months ago

WHITE-developer commented 6 months ago

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:

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);
};
ondrejmirtes commented 6 months ago

Install newer Rector, they're already in 1.x I believe.

github-actions[bot] commented 5 months ago

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.