spatie / ray

Debug with Ray to fix problems faster
https://myray.app
MIT License
554 stars 102 forks source link

Add rector rule to remove ray calls from a codebase #884

Closed timvandijck closed 5 months ago

timvandijck commented 5 months ago

2 ways of using it:

  1. In your own Rector config, by adding the RemoveRayCallRector rule.
  2. By using the package Rector config: ./vendor/bin/remove-ray.sh <path>
Plytas commented 5 months ago

And does it also work on macros like collect()->ray()?

timvandijck commented 5 months ago

Does this also work for chained calls? Like ray()->clearScreen() and ray('Hello')->red()?

And does it also work on macros like collect()->ray()?

Now it should!

Plytas commented 5 months ago

@timvandijck It doesn't seem to remove collection macro ray() call.

image
timvandijck commented 5 months ago

@Plytas good spot, it seems like it's not working when a macro line is not ending with ->ray() but with an other method.

I created an issue to track this, probably will be resolved next week: https://github.com/spatie/ray/issues/889