2017 © Pedro Peláez
 

library yii2-phpredis

yii2 with phpredis

image

dcb9/yii2-phpredis

yii2 with phpredis

  • Thursday, June 14, 2018
  • by bobchengbin
  • Repository
  • 5 Watchers
  • 39 Stars
  • 3,050 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 2 Open issues
  • 5 Versions
  • 36 % Grown

The README.md

Redis Cache and Session for Yii2

This extension provides the redis key-value store support for the Yii framework 2.0., (*1)

It includes a Cache and Session storage handler in redis., (*2)

Build Status Code Climate Test Coverage Issue Count Latest Stable Version Total Downloads License, (*3)

Notice: THIS REPO DOES NOT SUPPORT ACTIVE RECORD., (*4)

Requirements

  • PHP >= 5.4.0
  • Redis >= 2.6.12
  • ext-redis >= 2.2.7
  • Yii2 ~2.0.4

Installation

The preferred way to install this extension is through composer., (*5)

Either run, (*6)

php composer.phar require --prefer-dist dcb9/yii2-phpredis

or add, (*7)

"dcb9/yii2-phpredis": "~1.0"

to the require section of your composer.json., (*8)

Configuration

To use this extension, you have to configure the Connection class in your application configuration:, (*9)

return [
    //....
    'components' => [
        'redis' => [
            'class' => 'dcb9\redis\Connection',
            'hostname' => 'localhost',
            'port' => 6379,
            'database' => 0,
        ],
    ]
];

Run unit test

You can specific your redis config, (*10)

$ cp tests/config.php tests/config-local.php
$ vim tests/config-local.php

and Run, (*11)

$ ./vendor/bin/phpunit
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

............                           12 / 12 (100%)

Time: 600 ms, Memory: 10.00MB

OK (12 tests, 50 assertions)

Performance test

$ php tests/performance.php

phpredis-vs-yii-redis, (*12)

The Versions

14/06 2018

dev-master

9999999-dev

yii2 with phpredis

  Sources   Download

BSD

The Requires

 

The Development Requires

29/04 2018

dev-constrainRedisVersion

dev-constrainRedisVersion

yii2 with phpredis

  Sources   Download

BSD

The Requires

 

The Development Requires

29/06 2017

v1.1

1.1.0.0

yii2 with phpredis

  Sources   Download

BSD

The Requires

 

The Development Requires

29/06 2017

dev-addTests

dev-addTests

yii2 with phpredis

  Sources   Download

BSD

The Requires

 

The Development Requires

17/10 2016

v1.0

1.0.0.0

yii2 with phpredis

  Sources   Download

BSD

The Requires

 

The Development Requires