从Laravel 5.1.17升级到5.2.我的config/auth.php
本书最初包含:
'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.)
我有两个分支,L5.2和MASTER(位于5.1.17).在切换分支之后,我简单地运行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?
唯一修改过的其他文件是composer.json
、composer.lock
、app/Exceptions/Handler.php
和config/app.php
;没有触及Auth.