diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8cb19a04..266ed64c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -147,11 +147,3 @@ parameters: message: "#^Call to an undefined method PHPStan\\\\Type\\\\Type\\:\\:getValue\\(\\)\\.$#" count: 1 path: src/Drupal9/Rector/Deprecation/ExtensionPathRector.php - - - - message: """ - #^Fetching deprecated class constant REMOVE_NODE of class PhpParser\\\\NodeTraverser\\: - Use NodeVisitor\\:\\:REMOVE_NODE instead\\.$# - """ - count: 1 - path: src/Drupal9/Rector/Deprecation/PassRector.php diff --git a/src/Drupal9/Rector/Deprecation/PassRector.php b/src/Drupal9/Rector/Deprecation/PassRector.php index 60b68900..c0c9e047 100644 --- a/src/Drupal9/Rector/Deprecation/PassRector.php +++ b/src/Drupal9/Rector/Deprecation/PassRector.php @@ -7,6 +7,7 @@ use DrupalRector\Utility\GetDeclaringSourceTrait; use PhpParser\Node; use PhpParser\NodeTraverser; +use PhpParser\NodeVisitor; use Rector\Rector\AbstractRector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; @@ -51,7 +52,7 @@ public function refactor(Node $node) } if ($this->getDeclaringSource($node->expr) === 'Drupal\KernelTests\AssertLegacyTrait') { - return NodeTraverser::REMOVE_NODE; + return NodeVisitor::REMOVE_NODE; } return $node;