Skip to content

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

@WHITE-developer

Description

@WHITE-developer

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);
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions