File tree Expand file tree Collapse file tree 5 files changed +10
-11
lines changed
lib/Phpfastcache/Drivers/Predis Expand file tree Collapse file tree 5 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1212build :
1313 dependencies :
1414 override :
15- - " composer require -W --ignore-platform-reqs phpfastcache/phpssdb:~1.1 predis/predis:~1.1 aws/aws-sdk-php:~3.2 google/cloud-firestore:~1.20 solarium/solarium:~6.1 "
15+ - " composer require -W --ignore-platform-reqs phpfastcache/phpssdb:^1.2 predis/predis:^2.0 "
1616 nodes :
1717 analysis :
1818 project_setup :
Original file line number Diff line number Diff line change 33composer self-update
44composer validate
55composer install
6- composer require -W phpfastcache/phpssdb:~ 1.2 predis/predis:~ 1.1
6+ composer require -W phpfastcache/phpssdb:^ 1.2 predis/predis:^2.0
Original file line number Diff line number Diff line change 5151 "ext-wincache" : " *" ,
5252 "ext-leveldb" : " *" ,
5353 "ext-couchbase" : " ^3.0" ,
54- "predis/predis" : " ^1.1 " ,
54+ "predis/predis" : " ^2.0 " ,
5555 "phpfastcache/phpssdb" : " ~1.1.0" ,
5656 "phpfastcache/arangodb-extension" : " ^9.2" ,
5757 "phpfastcache/couchbasev4-extension" : " ^9.2" ,
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ public function getHelp(): string
6868 public function getStats (): DriverStatistic
6969 {
7070 $ info = $ this ->instance ->info ();
71- $ size = (isset ( $ info ['Memory ' ]['used_memory ' ]) ? $ info [ ' Memory ' ][ ' used_memory ' ] : 0 );
72- $ version = (isset ( $ info ['Server ' ]['redis_version ' ]) ? $ info [ ' Server ' ][ ' redis_version ' ] : 0 );
71+ $ size = ($ info ['Memory ' ]['used_memory ' ] ?? 0 );
72+ $ version = ($ info ['Server ' ]['redis_version ' ] ?? 0 );
7373 $ date = (isset ($ info ['Server ' ]['uptime_in_seconds ' ]) ? (new DateTime ())->setTimestamp (time () - $ info ['Server ' ]['uptime_in_seconds ' ]) : 'unknown date ' );
7474
7575 return (new DriverStatistic ())
@@ -78,8 +78,9 @@ public function getStats(): DriverStatistic
7878 ->setSize ((int )$ size )
7979 ->setInfo (
8080 sprintf (
81- "The Redis daemon v%s is up since %s. \n For more information see RawData. \n Driver size includes the memory allocation size. " ,
81+ "The Redis daemon v%s (with Predis v%s) is up since %s. \n For more information see RawData. \n Driver size includes the memory allocation size. " ,
8282 $ version ,
83+ PredisClient::VERSION ,
8384 $ date ->format (DATE_RFC2822 )
8485 )
8586 );
@@ -93,7 +94,7 @@ public function getStats(): DriverStatistic
9394 protected function driverConnect (): bool
9495 {
9596 /**
96- * In case of an user-provided
97+ * In case of a user-provided
9798 * Predis client just return here
9899 */
99100 if ($ this ->getConfig ()->getPredisClient () instanceof PredisClient) {
Original file line number Diff line number Diff line change @@ -8,14 +8,12 @@ parameters:
88 - '#PHPDoc tag @ (.*)#'
99 # Phpstan is not able to know the magic of Ssdb __call() implementation
1010 - '#Call to an undefined method phpssdb (.*)#'
11+
1112 # Phpstan not differencing couchbase and couchbase_v3 stubs from jetbrains/phpstorm-stubs
1213 -
1314 message : ' #(Method|Class) Couchbase(.*)#'
1415 path : lib/Phpfastcache/Drivers/Couchbasev3/Driver.php
15- # Issue in predis/predis => https://github.com/predis/predis/pull/710
16- -
17- message : ' #Cannot call method getPayload\(\) on int#'
18- path : lib/Phpfastcache/Drivers/Predis/Driver.php
16+
1917 # See https://github.com/phpstan/phpstan/issues/10315
2018 -
2119 message : ' #Dead catch - Phpfastcache\\Exceptions\\PhpfastcacheUnsupportedMethodException is never thrown in the try block.#'
You can’t perform that action at this time.
0 commit comments