Skip to content

[5.3] Replace RedisStore construct declaration#15041

Merged
taylorotwell merged 2 commits into
laravel:5.3from
fifsky:5.3
Aug 26, 2016
Merged

[5.3] Replace RedisStore construct declaration#15041
taylorotwell merged 2 commits into
laravel:5.3from
fifsky:5.3

Conversation

@fifsky
Copy link
Copy Markdown
Contributor

@fifsky fifsky commented Aug 25, 2016

Sorry, My english is very poor

I tried to use another Redis extension to replace the Redis\Database, but when the magic function __construct of Cache\RedisStore has been called I have got an exception as below:

FatalThrowableError in RedisStore.php line 39:
Type error: Argument 1 passed to Illuminate\Cache\RedisStore::__construct() must be an instance of Illuminate\Redis\Database, instance of Very\Redis\Database given, called in /home/wwwroot/test.pay.verystar.cn/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php on line 196
in RedisStore.php line 39
at RedisStore->__construct(object(Database), 'verystar_pay', 'default') in CacheManager.php line 196
at CacheManager->createRedisDriver(array('driver' => 'redis', 'connection' => 'default')) in CacheManager.php line 102
at CacheManager->resolve('redis') in CacheManager.php line 77
at CacheManager->get('redis') in CacheManager.php line 55
at CacheManager->store('redis') in SessionManager.php line 162
at SessionManager->createCacheHandler('redis') in SessionManager.php line 132
at SessionManager->createRedisDriver() in Manager.php line 87
at Manager->createDriver('redis') in Manager.php line 63
at Manager->driver() in StartSession.php line 117
at StartSession->getSession(object(Request)) in StartSession.php line 100
at StartSession->startSession(object(Request)) in StartSession.php line 57
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 644
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 618
at Router->dispatchToRoute(object(Request)) in Router.php line 596
at Router->dispatch(object(Request)) in Kernel.php line 263
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53

So, Maybe can be replaced with

use Illuminate\Contracts\Redis\Database as Redis;

@GrahamCampbell GrahamCampbell changed the title Replace RedisStore construct declaration [5.3] Replace RedisStore construct declaration Aug 25, 2016
@taylorotwell taylorotwell merged commit ae45047 into laravel:5.3 Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants