手动添加yii2-redis
1. 下载yii2-redis;
2. 将 yii2-redis 放在 yiisoft 目录下;
3. 修改 /vendor/composer/autoload_psr4.php;
'yii\redis\' => array($vendorDir . '/yiisoft/yii2-redis'),
4. 配置。
return [ //.... 'components' => [ //.... 'redis' => [ 'class' => 'yii edisConnection', 'hostname' => 'localhost', 'port' => 6379, 'database' => 0, ], ] ];