Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hxsen opened this issue Apr 25, 2020 · 4 comments

Comments

@hxsen
Copy link

hxsen commented Apr 25, 2020

报错内容:

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吗?

@okami-chen
Copy link

同这个错误

@huanBird
Copy link

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

@andyzu
Copy link

andyzu commented Aug 23, 2020

同这个错误

@jianyestudy
Copy link

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

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

// Rest of Redis configuration...

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

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

No branches or pull requests

5 participants