Use BetterNodeFinder for phpstan rule development #6921
-
|
I would love to use the BetterNodeFinder for my phpstan extension development. atm it seems its necessary to require the whole rector codebase to make use of it... is my observation correct? I tried requiring rector/rector, but even then I cannot use the BetterNodeFinder via constructor-injection. thx for any hints. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
BetterNodeFinder depends on some mechanics related to Rector run itself. For PHPStan rules, we use this one: If these is some method missing in |
Beta Was this translation helpful? Give feedback.
BetterNodeFinder depends on some mechanics related to Rector run itself.
For PHPStan rules, we use this one:
https://github.com/symplify/astral/blob/main/src/NodeFinder/SimpleNodeFinder.php
If these is some method missing in
SimpleNodeFinder, feel free to add it/move it. Its purpose is for PHPStan rules