redis-manager icon indicating copy to clipboard operation
redis-manager copied to clipboard

construct() must be an instance of Predis\ClientInterface, instance of Redis given

Open hxsen opened this issue 5 years ago • 4 comments

报错内容:

TypeError In Keyspace.php line 29 :
  Argument 1 passed to Predis\Collection\Iterator\Keyspace::__construct() must be an instance of Predis\ClientInterface, instance of Redis given, called in G:\WWW\bridge\vendor\laravel-admin-ext\redis-manager\src\RedisManager.php on line 176

使用php的redis插件的redis实例,不兼容吗?一定要使用predis吗?

hxsen avatar Apr 25 '20 02:04 hxsen

同这个错误

okami-chen avatar Jun 12 '20 14:06 okami-chen

7.0版本的laravel,也报这个错误!

huanBird avatar Aug 14 '20 09:08 huanBird

同这个错误

andyzu avatar Aug 23 '20 11:08 andyzu

解决办法: 修改config/database.php 中的 'redis' => [

'client' => env('REDIS_CLIENT', 'predis'),

// Rest of Redis configuration...

], 要使用 Predis 扩展,需要将环境变量从 phpredis 选项修改为 predis

jianyestudy avatar Dec 11 '20 06:12 jianyestudy