laravel / tinker

Powerful REPL for the Laravel framework.
https://laravel.com/docs/artisan#tinker
MIT License
7.34k stars 130 forks source link

PHP Warning after logging in using Auth in Tinker #111

Closed micksp closed 4 years ago

micksp commented 4 years ago

Description:

when I login using Auth::login in Tinker, I get a warning:

PHP Warning:  unlink({path}/storage/framework/sessions/3p6YqECrq3EAMP4Hdz2X5IBdw4cfRG30bLNpY9z4): 
No such file or directory in {path}/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 220

After the warning, everything works, I can use my usual queries that need a logged-in user. So this is not a high prio thing. Seems there is no session present to be removed.

Steps To Reproduce:

  1. start tinker artisan tinker
  2. login user
    $u = User::find(1);
    Auth::login($u);
driesvints commented 4 years ago

I don't think keeping track of session state through Tinker makes sense.