Closed nextgeni-mubbi closed 9 months ago
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
Sanctum Version
3.2
Laravel Version
10.23
PHP Version
8.2
Database Driver & Version
MySQL 8 for macOs 14.1.1 on arm64 homebrew
Description
I was doing unit tests for my application and did around 238 tests with 489 assertions, when i run parallel unit testing then this error occurs "Auth guard [sanctum] is not defined." otherwise if a non-parallel tests suit is run then everything is fine.
Also this error comes randomly in parallel testing. i suspected the issue is due to the cache and i ran the "php artisan optimize:clear" then it works fine for few test runs. but again comes up in parallel testing after a while.
Here is the screenshot of the error:
after some google search i also find same issue with a user and someone also provided the cache clear solution: https://stackoverflow.com/questions/65924153/laravel-auth-guard-sanctum-is-not-defined
I am unable to find any specific error/issue with sanctum, can someone please look into this error and have a fix for sanctum or temporary fix for my parallel tests?
Steps To Reproduce
i dont know the exact steps but this is what i done: