imanghafoori1 / laravel-microscope

Fearless refactoring, it does a lot of smart checks to find certain errors.
MIT License
1.47k stars 97 forks source link

Web routes false positive #230

Closed robov closed 1 year ago

robov commented 2 years ago

this generates a class not exists image image

When commenting out other code image results in no errors

imanghafoori1 commented 2 years ago

if you do not want to import the full namespace, you should not use the ::class syntax. It is not really a bug since the WebhookController::class does not exist and it has a namespace.

You better pass it as a string: 'WebhookController'

robov commented 2 years ago

in this case the namespace is in the use statement : use App\Core\Billing\DebtCollection\Controllers\WebhookController; and this Name::class is the laravel perferred way over a stringy version of 'class'

So I do not completely understand what is wrong in my case

imanghafoori1 commented 2 years ago

could you please upload a summary of the route file? Since the screen shots do not include the use statements at the top.

robov commented 2 years ago

sure image

image

imanghafoori1 commented 1 year ago

Not able to reproduce it.