Remove ray calls - Undefined Method in PHPStan\PhpDocParser - getParamImmediatelyInvokedCallableTagValues()
rikgirbes opened this issue · 4 comments
When running the script, an error occurs while processing the file ...
. The error points to an undefined method getParamImmediatelyInvokedCallableTagValues()
in PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode
. The error occurs on line 308.
[ERROR] Could not process "..." file, due
to:
"Call to undefined method
PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getParamImmediatelyInvokedCallableTagValues()". On line: 308
Versions
- spatie/ray package version: 1.41.2
- PHP version: 8.3
To Reproduce
Steps to reproduce the behavior:
Run the script (vendor/bin/remove-ray.sh
) that processes PHP files.
Expected behavior
The script should process the file without encountering any undefined method errors.
Additional context
This issue seems related to PHPStan's PhpDocParser
handling of callable tag values. The method getParamImmediatelyInvokedCallableTagValues()
might not exist or be incorrectly referenced in the processing logic./
What parameter/directory do you pass when running the script?
What platform are you on?
Directly from my composer.json
file:
"remove-ray-calls": "./vendor/bin/remove-ray.sh classes tests includes"
I encounter the same issue on both:
- My local machine: macOS Sequoia 15.1, running PHP 8.3.
- A Docker container: Linux Alpine with PHP-FPM 8.3.
@rikgirbes thank, that looks fine. Also good to know you experience this on two different systems.
Could it be something to do with the version of Rector you are running? rectorphp/rector#8665
Personally I'm on 1.2.10 and have no problems.
That did the trick! Just made a small update to Rector, and everything seems to be running smoothly now. Thanks!