@@ -84,9 +84,15 @@ public function getApplication()
8484 $ auth ->extend ('session ' , function ($ app , $ name , $ config ) {
8585 $ provider = $ app ['auth ' ]->createUserProvider ($ config ['provider ' ]);
8686 $ 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+ }
9096
9197 return $ guard ;
9298 });
@@ -118,6 +124,7 @@ public function postHandle($app)
118124 //note that lumen does not have the getProvider method
119125 if (method_exists ($ this ->app , 'getProvider ' )) {
120126 //reset debugbar if available
127+ $ this ->resetProvider ('\Illuminate\Redis\RedisServiceProvider ' );
121128 $ this ->resetProvider ('\Illuminate\Cookie\CookieServiceProvider ' );
122129 $ this ->resetProvider ('\Illuminate\Session\SessionServiceProvider ' );
123130 }
0 commit comments