@@ -84,9 +84,15 @@ public function getApplication()
84
84
$ auth ->extend ('session ' , function ($ app , $ name , $ config ) {
85
85
$ provider = $ app ['auth ' ]->createUserProvider ($ config ['provider ' ]);
86
86
$ guard = new \PHPPM \Laravel \SessionGuard ($ name , $ provider , $ app ['session.store ' ], null , $ app );
87
- $ guard ->setCookieJar ($ app ['cookie ' ]);
88
- $ guard ->setDispatcher ($ app ['events ' ]);
89
- $ guard ->setRequest ($ app ->refresh ('request ' , $ guard , 'setRequest ' ));
87
+ if (method_exists ($ guard , 'setCookieJar ' )) {
88
+ $ guard ->setCookieJar ($ this ->app ['cookie ' ]);
89
+ }
90
+ if (method_exists ($ guard , 'setDispatcher ' )) {
91
+ $ guard ->setDispatcher ($ this ->app ['events ' ]);
92
+ }
93
+ if (method_exists ($ guard , 'setRequest ' )) {
94
+ $ guard ->setRequest ($ this ->app ->refresh ('request ' , $ guard , 'setRequest ' ));
95
+ }
90
96
91
97
return $ guard ;
92
98
});
@@ -118,6 +124,7 @@ public function postHandle($app)
118
124
//note that lumen does not have the getProvider method
119
125
if (method_exists ($ this ->app , 'getProvider ' )) {
120
126
//reset debugbar if available
127
+ $ this ->resetProvider ('\Illuminate\Redis\RedisServiceProvider ' );
121
128
$ this ->resetProvider ('\Illuminate\Cookie\CookieServiceProvider ' );
122
129
$ this ->resetProvider ('\Illuminate\Session\SessionServiceProvider ' );
123
130
}
0 commit comments