cesargb / laravel-magiclink

Create link for authenticate in Laravel without password or get private content
MIT License
385 stars 44 forks source link

phpstorm detecting an error #66

Closed CovertError closed 2 years ago

CovertError commented 2 years ago

so I'm using multiple authentication guards and when i try to get the id of a user like this

'patient_id' => Auth::guard('users')->user()->id, I get an error in phpstorm that says this

Screen Shot 2022-06-17 at 3 41 39 PM

but functionally everything works

cesargb commented 2 years ago

the MagicLink\Test\TestSupport\ CustomAutenticable class should not be used outside of test environments.

CovertError commented 2 years ago

I'm not using it but for some reason phpstorm is detecting it when I use Auth::guard('users')->user()->id

fabianwennink commented 2 years ago

I experience the same issue. PhpStorm somehow detects the test class and applies it to the Auth facade. Even after invalidating caches, re-indexing, rebuilding the autoloader, this warning will still be shown.

image