php-redis 5以后废弃了一些方法名
被弃用方法名 | 替代方法名 |
---|---|
delete | del |
zUnion | zunionstore |
zInter | zinterstore |
zDeleteRangeByRank | zRemRangeByRank |
zDeleteRangeByScore | zRemRangeByScore |
zDelete | zRem |
setTimeout | expire |
sContains | sismember |
sRemove | srem |
sSize | scard |
lGetRange | lrange |
lGet | lindex |
listTrim | ltrim |
lRemove | lrem |
lSize | lLen |
getKeys | keys |
getMultiple | mget |
renameKey | rename |
参考:
https://www.drupal.org/project/redis/issues/3068810 this is caused by the update to php-redis 5, apparently only in the PHP 7.3 images. 这是由于更新至 php-redis 5 版本后所造成的,很明显只会在 PHP 7.3 出现
https://github.com/phpredis/phpredis/pull/1588 all aliases are deprecated & delete is an alias for del 所有的别名被弃用 & delete 之前是作为 del 的别名
https://pecl.php.net/package-changelog.php?package=redis&release=5.0.0 Soft deprecate methods that aren't actually Redis commands [a81b4f2d, 95c8aab9] 被弃用的方法实际上并不是 Redis 本身自带的命令
https://github.com/phpredis/phpredis/pull/1572