Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpstorm detecting an error #66

Closed
CovertError opened this issue Jun 17, 2022 · 3 comments
Closed

phpstorm detecting an error #66

CovertError opened this issue Jun 17, 2022 · 3 comments

Comments

@CovertError
Copy link

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
Copy link
Owner

cesargb commented Jun 25, 2022

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

@CovertError
Copy link
Author

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

@fabianwennink
Copy link

fabianwennink commented Jul 21, 2022

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

cesargb added a commit that referenced this issue Jul 21, 2022
@cesargb cesargb pinned this issue Jul 21, 2022
@cesargb cesargb unpinned this issue Jul 21, 2022
cesargb added a commit that referenced this issue Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants