File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 "require" : {
1515 "php" : " ~7.1.0 || ~7.2.0" ,
1616 "ext-redis" : " ~3.1.6 || ~4.0" ,
17- "awonderphp/simplecache" : " dev-devel " ,
17+ "awonderphp/simplecache" : " dev-master " ,
1818 "psr/simple-cache" : " ^1.0"
1919 },
2020 "require-dev" : {
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ protected function setRedisObject($obj): bool
4141 if (! $ obj instanceof \Redis) {
4242 throw \AWonderPHP \SimpleCache \StrictTypeException::redisConnectorExpected ($ obj );
4343 }
44+ $ test = $ obj ->ping ();
45+ if ($ test !== "+PONG " ) {
46+ throw \AWonderPHP \SimpleCache \InvalidSetupException::pingNoPongRedis ();
47+ }
4448 $ this ->redis = $ obj ;
4549 return true ;
4650 }//end setRedisObject()
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ protected function setRedisObject($obj): bool
4141 if (! $ obj instanceof \Redis) {
4242 throw \AWonderPHP \SimpleCache \StrictTypeException::redisConnectorExpected ($ obj );
4343 }
44+ $ test = $ obj ->ping ();
45+ if ($ test !== "+PONG " ) {
46+ throw \AWonderPHP \SimpleCache \InvalidSetupException::pingNoPongRedis ();
47+ }
4448 $ this ->redis = $ obj ;
4549 return true ;
4650 }//end setRedisObject()
You can’t perform that action at this time.
0 commit comments