driftingly/rector-laravel

Error introduced by JsonCallToExplicitJsonCallRector

Closed this issue · 1 comments

My code in my tests here

$response = $this->json('GET', route('brands.index'), $payload);

Has been converted to

$response = $this->getJson(route('brands.index'), $payload);

But should be converted to this to keep argument in get

$response = $this->getJson(route('brands.index', $payload));

@jeff1326 the json() GET requests with more than 2 parameters are left unchanged since 1.1.1.
I will try to make it work with the route() helper, which is quite common, but it's a bit tricky and will take some time since the third variable is not always the data argument, since there can be named arguments.