-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging a custom Rector with xDebug and PHPStorm #3667
Comments
Hi, good question. I thought we have it in README, but we don't. I've added it: |
Thanks for the super fast reponse, that was 1 step forward! now I just need to figure out why I'm seeing: Fatal error: Uncaught TypeError: realpath() expects parameter 1 to be a valid path, null given in phar:///media/app/include/vendor/rector/rector-prefixed/rector/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php on line 209 |
That's hard to tell just from this 1 line. What happens when you actually add the We might need a reproducible repository for this. |
include/vendor/bin/rector process include/custom/reports.inc --config rector.yaml --dry-run --set code-quality --xdebug PHP Fatal error: Uncaught TypeError: realpath() expects parameter 1 to be a valid path, null given in phar:///media/app/include/vendor/rector/rector-prefixed/rector/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php:209 Fatal error: Uncaught TypeError: realpath() expects parameter 1 to be a valid path, null given in phar:///media/app/include/vendor/rector/rector-prefixed/rector/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php on line 209 TypeError: realpath() expects parameter 1 to be a valid path, null given in phar:///media/app/include/vendor/rector/rector-prefixed/rector/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php on line 209 Call Stack: Variables in local scope (#15): |
Thanks. Nothing obivous so far. What's in your Do you have PHPStan? If so and if you remove |
rector.yaml: parameters: |
phpstan.neon: parameters: |
I've tried removing everything I think, none of which seems to have an effect. Now that I look I have the phpstan.neon file but no mention of it in my composer.json ... Well that didn't change anything |
That's unfortuntate 😢 In that case we need minimal reproductible repository in Github. That we can install & run locally and see the same error. |
OK I'll get something set up |
Oh my word.... so I just realised that under exclude_paths in rector.yaml I had one extra "-" which then didn't have an option to it:
Many thanks for your help! |
rectorphp/rector-src@7bcda1e [Test] Reduce RunTestsInSeparateProcesses usage (#3667)
Hello,
I'm at a bit of a loss, how does one go about debugging a custom Rector, I've searched all over and can't find a guide that points me in the right direction?
Thanks!
The text was updated successfully, but these errors were encountered: