simple way to use phpredis
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist liyifei/yii2-redis "*"
or add
"liyifei/yii2-redis": "*"
to the require section of your composer.json
file.