hyperf 默认 demo 提示找不到 Redis,Redis 配置是对的,其它框架 Redis 使用正常。。。
<?php
use Hyperf\Utils\ApplicationContext;
$container = ApplicationContext::getContainer();
$redis = $container->get(\Redis::class);
$result = $redis->keys('*');
[ERROR] Class 'Redis' not found[100] in /home/vagrant/code/hyperf/vendor/hyperf/redis/src/RedisConnection.php
[ERROR] #0 /home/vagrant/code/hyperf/vendor/hyperf/redis/src/RedisConnection.php(62): Hyperf\Redis\RedisConnection->reconnect()
REDIS_HOST=127.0.0.1
REDIS_AUTH=
REDIS_PORT=6379
REDIS_DB=0
composer require hyperf/redis 有么
缺少了 Redis 扩展
你好,请问你当时是怎么解决的?我也遇到同样问题了