Upgrading from Laravel 5.1.17 to 5.2. My config/auth.php
originally contained:
'driver' => 'eloquent',
'model' => 'Project\User',
'table' => 'users',
New file is the same as the default, except with the updated namespace.
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => Project\User::class,
],
],
My env SESSION_DRIVER
is redis
. I did not clear anything from Redis. (Note, this also happened in my other projects where driver was file
, but I didn't care about it as much for them.)
I have two branches, L5.2 and master (which is on 5.1.17). After switching branches, I simply run composer install
If I login on master, then switch to L5.2, I am logged out
If I switch back to master, I am logged back in
If I login on L5.2, then switch to master, I stay logged in
If I switch back to L5.2, I stay logged in
I'm hesitant to upgrade if it's going to invalidate all of my users' sessions and force them to login again. Is there a way to avoid this?
The only other files that were modified were composer.json
, composer.lock
, app/Exceptions/Handler.php
, and config/app.php
; nothing that touched Auth.