Skip to content

Commit

Permalink
fix: REMOVE_NODE constant has moved
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Jan 24, 2025
1 parent 6afdd39 commit e26e404
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion src/Drupal9/Rector/Deprecation/PassRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e26e404

Please sign in to comment.