@@ -4,25 +4,10 @@ This extension provides the [redis](http://redis.io/) key-value store support fo
44
55It includes a ` Cache ` and ` Session ` storage handler in redis.
66
7-
8- [ ![ Build Status] ( https://travis-ci.org/dcb9/yii2-phpredis.svg?branch=master )] ( https://travis-ci.org/dcb9/yii2-phpredis )
9- [ ![ Code Climate] ( https://codeclimate.com/github/dcb9/yii2-phpredis/badges/gpa.svg )] ( https://codeclimate.com/github/dcb9/yii2-phpredis )
10- [ ![ Test Coverage] ( https://codeclimate.com/github/dcb9/yii2-phpredis/badges/coverage.svg )] ( https://codeclimate.com/github/dcb9/yii2-phpredis/coverage )
11- [ ![ Issue Count] ( https://codeclimate.com/github/dcb9/yii2-phpredis/badges/issue_count.svg )] ( https://codeclimate.com/github/dcb9/yii2-phpredis )
12- [ ![ Latest Stable Version] ( https://poser.pugx.org/dcb9/yii2-phpredis/version )] ( https://packagist.org/packages/dcb9/yii2-phpredis )
13- [ ![ Total Downloads] ( https://poser.pugx.org/dcb9/yii2-phpredis/downloads )] ( https://packagist.org/packages/dcb9/yii2-phpredis )
14- [ ![ License] ( https://poser.pugx.org/dcb9/yii2-phpredis/license )] ( https://packagist.org/packages/dcb9/yii2-phpredis )
7+ [ ![ Build Status] ( https://travis-ci.org/nuwber/yii2-phpredis.svg?branch=master )] ( https://travis-ci.org/nuwber/yii2-phpredis )
158
169** Notice: THIS REPO DOES NOT SUPPORT ACTIVE RECORD.**
1710
18- Requirements
19- ------------
20-
21- - PHP >= 5.4.0
22- - Redis >= 2.6.12
23- - ext-redis >= 2.2.7
24- - Yii2 ~ 2.0.4
25-
2611Installation
2712------------
2813
@@ -50,15 +35,20 @@ To use this extension, you have to configure the Connection class in your applic
5035
5136``` php
5237return [
53- //....
5438 'components' => [
5539 'redis' => [
56- 'class' => ' dcb9\redis\Connection' ,
40+ 'class' => \ dcb9\redis\Connection::class ,
5741 'hostname' => 'localhost',
5842 'port' => 6379,
5943 'database' => 0,
6044 ],
61- ]
45+ 'cache' => [
46+ 'class' => \dcb9\redis\Cache::class,
47+ ],
48+ 'session' => [
49+ 'class' => \dcb9\redis\Session::class,
50+ ],
51+ ],
6252];
6353```
6454
@@ -67,22 +57,14 @@ Run unit test
6757
6858You can specific your redis config
6959
70- ```
60+ ``` bash
7161$ cp tests/config.php tests/config-local.php
72- $ vim tests/config-local.php
7362```
7463
7564and Run
7665
77- ```
66+ ``` bash
7867$ ./vendor/bin/phpunit
79- PHPUnit 5.6.1 by Sebastian Bergmann and contributors.
80-
81- ............ 12 / 12 (100%)
82-
83- Time: 600 ms, Memory: 10.00MB
84-
85- OK (12 tests, 50 assertions)
8668```
8769
8870Performance test
0 commit comments