spatie / laravel-ray

Debug with Ray to fix problems faster in Laravel apps
https://myray.app
MIT License
291 stars 64 forks source link

php artisan ray:clean doesn't cleanup everythign #332

Closed sandersjj closed 9 months ago

sandersjj commented 9 months ago

Describe the bug I had this piece of code still in my repo after running php artisan ray:clean:


     return Product::select('id', DB::raw("CONCAT(IF(available, '', 'NML-'), item_code, ' - ', item_description) as concatenated_value"))
                        ->where('brand_id', $brandId)
                        ->having('concatenated_value', 'like', "%{$search}%")
                        ->limit(25)
                        ->pluck('concatenated_value', 'id')
                        ->ray()
                        ->toArray();
                })

**Versions**
Version of the app: 2.7.5 
version of spatie/ray: 1.41.1

PHP version:8.2.15
Laravel version:10.43.0

**To Reproduce**
Steps to reproduce the behavior:
See above.

**Expected behavior**
I would expect ray() to be gone from the codebase after running the above command. 

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: Mac OS.
 - Version Sanoma 14.3
timvandijck commented 9 months ago

@sandersjj this indeed seems to be a case we haven't quite covered yet. I'm going to close this issue though and keep track in the main Ray repo as that's where we will implement the solution: https://github.com/spatie/ray/issues/889

Thank you for sharing this example of the issue!

sandersjj commented 9 months ago

Thank you @timvandijck