Skip to content

Commit 7c60fa1

Browse files
committed
Merge pull request #39 from cheprasov/dev-1.2.3
v1.2.3
2 parents 1e8415a + 9df80af commit 7c60fa1

File tree

20 files changed

+280
-17
lines changed

20 files changed

+280
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## CHANGELOG
22

3+
### v1.2.3 (2016-05-02)
4+
- Fixed command **PING** for Redis <= 2.6.
5+
- Added common tests.
6+
37
### v1.2.2 (2016-03-30)
48
- Fixed annotations and phpDocs.
59
- Fixed some tests.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
22
[![Latest Stable Version](https://poser.pugx.org/cheprasov/php-redis-client/v/stable)](https://packagist.org/packages/cheprasov/php-redis-client)
33
[![Total Downloads](https://poser.pugx.org/cheprasov/php-redis-client/downloads)](https://packagist.org/packages/cheprasov/php-redis-client)
4-
# RedisClient v1.2.2 for PHP >= 5.5
4+
# RedisClient v1.2.3 for PHP >= 5.5
55

66
## About
77
RedisClient is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from __2.6__ to __3.2.0-RC3__
@@ -15,6 +15,7 @@ RedisClient is a fast, fully-functional and user-friendly client for Redis, opti
1515
- Connections to Redis are established lazily by the client upon the first command.
1616
- Easy to use with IDE, client has PHPDocs for all supported versions.
1717
- By default, the client works with the latest stable version of Redis.
18+
- About **6.5-8.5% faster** than predis (based on this test: https://github.com/cheprasov/php-redis-client-vs-predis-test)
1819

1920
## Usage
2021

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cheprasov/php-redis-client",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Php client for Redis. It is a fast, fully-functional and user-friendly client for Redis, optimized for performance. RedisClient supports the latest versions of Redis starting from 2.6 to 3.2.0-RC3",
55
"homepage": "http://github.com/cheprasov/php-redis-client",
66
"minimum-stability": "stable",

src/RedisClient/Client/AbstractRedisClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
abstract class AbstractRedisClient {
2222

23-
const VERSION = '1.2.2';
23+
const VERSION = '1.2.3';
2424

2525
const CONFIG_SERVER = 'server';
2626
const CONFIG_TIMEOUT = 'timeout';
@@ -184,6 +184,7 @@ public function executeRaw($structure) {
184184
}
185185

186186
/**
187+
* Command will parsed by the client, before sent to server
187188
* @param string $command
188189
* @return mixed
189190
*/

src/RedisClient/Command/Traits/Version2x6/ConnectionCommandsTrait.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ public function echoMessage($message) {
4545
}
4646

4747
/**
48-
* PING [message]
48+
* PING
4949
* Available since 1.0.0.
5050
* @link http://redis.io/commands/ping
5151
*
52-
* @param string $message
5352
* @return string Returns message
5453
*/
55-
public function ping($message = null) {
56-
return $this->returnCommand(['PING'], isset($message) ? [$message] : null);
54+
public function ping() {
55+
return $this->returnCommand(['PING']);
5756
}
5857

5958
/**

src/RedisClient/Command/Traits/Version2x8/CommandsTrait.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
namespace RedisClient\Command\Traits\Version2x8;
1212

1313
use RedisClient\Command\Traits\AbstractCommandsTrait;
14-
use RedisClient\Command\Traits\Version2x6\ConnectionCommandsTrait;
1514
use RedisClient\Command\Traits\Version2x6\ListsCommandsTrait;
1615
use RedisClient\Command\Traits\Version2x6\ScriptingCommandsTrait;
1716
use RedisClient\Command\Traits\Version2x6\TransactionsCommandsTrait;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* This file is part of RedisClient.
4+
* git: https://github.com/cheprasov/php-redis-client
5+
*
6+
* (C) Alexander Cheprasov <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
namespace RedisClient\Command\Traits\Version2x8;
12+
13+
use RedisClient\Command\Traits\Version2x6\ConnectionCommandsTrait as ConnectionCommandsTraitVersion2x6;
14+
15+
/**
16+
* Connection Commands
17+
* @link http://redis.io/commands#connection
18+
*
19+
* @method string echo($message)
20+
*/
21+
trait ConnectionCommandsTrait {
22+
23+
use ConnectionCommandsTraitVersion2x6;
24+
25+
/**
26+
* PING [message]
27+
* Available since 1.0.0.
28+
* @link http://redis.io/commands/ping
29+
*
30+
* @param string $message
31+
* @return string Returns message
32+
*/
33+
public function ping($message = null) {
34+
return $this->returnCommand(['PING'], isset($message) ? [$message] : null);
35+
}
36+
37+
}

src/RedisClient/Command/Traits/Version3x0/CommandsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
namespace RedisClient\Command\Traits\Version3x0;
1212

1313
use RedisClient\Command\Traits\AbstractCommandsTrait;
14-
use RedisClient\Command\Traits\Version2x6\ConnectionCommandsTrait;
14+
use RedisClient\Command\Traits\Version2x8\ConnectionCommandsTrait;
1515
use RedisClient\Command\Traits\Version2x8\HashesCommandsTrait;
1616
use RedisClient\Command\Traits\Version2x6\ListsCommandsTrait;
1717
use RedisClient\Command\Traits\Version2x6\ScriptingCommandsTrait;

src/RedisClient/Command/Traits/Version3x2/CommandsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use RedisClient\Command\Traits\Version2x8\LatencyCommandsTrait;
1515
use RedisClient\Command\Traits\Version2x8\PubSubCommandsTrait;
1616
use RedisClient\Command\Traits\Version3x0\ClusterCommandsTrait;
17-
use RedisClient\Command\Traits\Version2x6\ConnectionCommandsTrait;
17+
use RedisClient\Command\Traits\Version2x8\ConnectionCommandsTrait;
1818
use RedisClient\Command\Traits\Version2x8\HyperLogLogCommandsTrait;
1919
use RedisClient\Command\Traits\Version2x6\ListsCommandsTrait;
2020
use RedisClient\Command\Traits\Version3x0\SortedSetsCommandsTrait;

src/RedisClient/Pipeline/Version/Pipeline2x6.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* @method Pipeline2x6 auth($password)
2121
* @method Pipeline2x6 echo($message)
2222
* @method Pipeline2x6 echoMessage($message) - alias method for reversed word <echo>
23-
* @method Pipeline2x6 ping($message = null)
23+
* @method Pipeline2x6 ping()
2424
* @method Pipeline2x6 quit()
2525
* @method Pipeline2x6 select($db)
2626
*

0 commit comments

Comments
 (0)