Daniele Alessandri
8aec51b34f
Implement full support for IPv6.
...
Using IPv6 with Predis was basically impossible due to various inconsistencies
and bugs through the library, now it is supported by all the connection classes.
Following the standard for IPv6 literal addresses in URI strings, the IP literal
must be enclosed within square brackets when passing the parameters as a string:
$parameters = 'tcp://[2001:db8:0:f101::1]:6379';
See https://tools.ietf.org/html/rfc3986#section-3.2.2 for further details.
This commit also fixes #239 making redis-cluster usable with nodes using IPv6.
2015-07-29 23:09:52 +02:00
Daniele Alessandri
eeb1e8b7a7
Reduce unneeded code duplication in URI parsing.
2015-07-29 17:04:34 +02:00
Daniele Alessandri
c3a44b8e2e
Strip brackets from host when parsing embedded IPv6 address.
...
I don't know why PHP's parse_url() does not do that, it does not make
sense when the IP is by itself so maybe it is a bug?
2015-07-29 17:01:19 +02:00
Daniele Alessandri
255beac137
Use static:: for invoking static methods in key prefix processor.
...
This trivial change makes it possible to use overridden static methods
when extending Predis\Command\Processor\KeyPrefixProcessor. PHP always
invokes the static methods of a parent class when using self:: even if
the extended classes override them.
2015-07-29 14:16:52 +02:00
Daniele Alessandri
d473328a22
Update CHANGELOG.
2015-07-29 11:54:08 +02:00
Daniele Alessandri
0d25e7b0bb
Add new command: HSTRLEN (Redis 3.2.0).
...
Also bump the unstable profile version to 3.2.
2015-07-29 11:52:55 +02:00
Daniele Alessandri
be3b84ca14
Rephrase latest entries in CHANGELOG by using intelligible English.
...
[ci skip]
2015-07-26 22:27:57 +02:00
Daniele Alessandri
7d0597c62c
Rephrase some parts of the README.
...
[ci skip]
2015-07-26 22:27:49 +02:00
Daniele Alessandri
833e46b79d
[tests] Fix typo.
2015-07-25 21:59:08 +02:00
Daniele Alessandri
a22858438d
[tests] Require pcntl extension to run blocking PubSub\Consumer test.
2015-07-25 21:58:01 +02:00
Daniele Alessandri
f221d0c81e
Run php-cs-fixer.
2015-07-25 21:27:05 +02:00
Daniele Alessandri
0b5bfdfe33
[tests] Improve code-reuse in tests for the Predis\Connection namespace.
2015-07-25 21:27:02 +02:00
Daniele Alessandri
3700d48771
[tests] Share common test among connection classes.
2015-07-25 20:54:01 +02:00
Daniele Alessandri
653d3f08ab
[tests] Use @requires annotation.
2015-07-25 20:52:01 +02:00
Daniele Alessandri
2d2de7837b
[tests] Fix some tests methods names.
2015-07-25 10:07:58 +02:00
Daniele Alessandri
fc18e6456a
[tests] Apply small changes to commands tests with expirations.
2015-07-25 10:07:55 +02:00
Daniele Alessandri
6f2064ed90
[tests] Cover SET modifiers EX, PX, NX|XX (Redis >= 2.6.12).
2015-07-25 09:11:16 +02:00
Daniele Alessandri
e2e645a8bd
Update .gitattributes file.
...
[ci skip]
2015-07-24 23:31:04 +02:00
Daniele Alessandri
2219964b7e
Restore alignment for a few equals symbols.
2015-07-24 23:21:23 +02:00
Daniele Alessandri
381e44b6e6
Run php-cs-fixer with new configuration.
2015-07-24 23:21:07 +02:00
Daniele Alessandri
808693bfbd
Add .php_cs configuration file for php-cs-fixer.
2015-07-24 23:19:23 +02:00
Daniele Alessandri
33eab38314
Remove unneeded "use" imports.
2015-07-24 21:25:48 +02:00
Daniele Alessandri
82e404660e
Run php-cs-fixer against codebase in src/ and tests/.
2015-07-24 17:58:56 +02:00
Daniele Alessandri
6d60a42400
[tests] Fix me being stupid here.
2015-07-24 17:35:53 +02:00
Daniele Alessandri
95624de5c4
[tests] Apply some fixes and improvements and remove old stuff.
2015-07-24 17:27:41 +02:00
Daniele Alessandri
2ee135099c
Remove useless if condition.
2015-07-24 12:40:33 +02:00
Daniele Alessandri
e26e3b423a
Reverting stupid oversight after a merge from master branch.
...
The culprit is commit 3500371 .
2015-07-24 10:49:14 +02:00
Daniele Alessandri
946fac4454
No need to check the scheme here.
...
Bug introduced in v1.0-dev after changes to support redis scheme.
Fixes #268
2015-07-24 10:45:12 +02:00
Daniele Alessandri
4e976a3eb6
Update CHANGELOG.
...
[ci skip]
2015-07-23 21:05:05 +02:00
Daniele Alessandri
baaf26fe5b
Add support for the 'redis://' scheme in URI strings.
...
The URI string will be handled following the rules as described by the
the provisional IANA registration document that can be found on IANA's
website: http://www.iana.org/assignments/uri-schemes/prov/redis .
2015-07-23 19:21:16 +02:00
Daniele Alessandri
6a0348fbea
Add missing command: MIGRATE (Redis 2.6.0).
...
Fixes #209 .
2015-07-23 19:21:03 +02:00
Daniele Alessandri
8365a6be77
[tests] Fix minor oversight.
2015-07-23 19:20:52 +02:00
Daniele Alessandri
f028e428be
Switch to container-based builds on Travis CI.
...
We do not need "sudo" anyway.
See http://docs.travis-ci.com/user/migrating-from-legacy/ for details.
2015-07-23 12:16:27 +02:00
Daniele Alessandri
c13b82557d
Update CHANGELOG.
2015-07-23 11:43:47 +02:00
Daniele Alessandri
30d01c40d4
[tests] Improve assert failure messages for replication stategy tests.
2015-07-23 11:40:52 +02:00
Daniele Alessandri
6459546e25
Fix missing BITPOS in replication strategy.
2015-07-23 11:40:39 +02:00
Daniele Alessandri
dede828008
Add missing BITPOS command in key prefix processor.
...
See #265 .
2015-07-23 11:40:27 +02:00
Daniele Alessandri
5c0716575e
Exclude .php-version file.
...
[ci skip]
2015-07-19 13:05:40 +02:00
Richard Heelin
90bffb1a5a
Emit socket error if ipredis connection has been lost/reset.
...
The current code is checking for a failure (return false) or an empty buffer string, however
neither of these will be the case if the connection has been reset or has errored. According
to the docs for socket_recv, $buffer will be set to null if the connection is reset or their
is no data. As currently null is not allowed for, we enter an infinite loop, to prevent this
I've added null to the things we check before we emit a socket error. This prevents the
infinite loop and correctly results in an Exception if the connection is lost/reset.
Conflicts:
src/Connection/PhpiredisSocketConnection.php
2015-07-07 18:51:44 +02:00
Daniele Alessandri
64ee96c312
[tests] Fix base test case class to handle required Redis versions.
...
This change is needed due to some internal changes in one of the
latest minor releases of PHPUnit 4.x that essentially broke how we
were checking for the required Redis version from method annotations.
2015-07-07 18:05:55 +02:00
Daniele Alessandri
bff5a9729e
Update CHANGELOG.
2015-07-07 16:19:46 +02:00
Daniele Alessandri
5cd7b774c4
[tests] Adapt to internal encoding changes for lists in Redis 3.0.
2015-07-07 16:11:49 +02:00
Daniele Alessandri
354d1ef921
Support ZADD modifiers when using simplified command signature.
...
The NX|XX, CH and INCR modifiers for ZADD are available in Redis since
version 3.0.2. See http://redis.io/commands/ZADD for additional info.
2015-07-07 16:11:43 +02:00
Daniele Alessandri
9e3a8da94d
Update CHANGELOG.
2015-07-07 15:01:00 +02:00
Daniele Alessandri
35003713a2
Merge remote-tracking branch 'github/pr/235' into v1.0
...
Conflicts:
.travis.yml
CHANGELOG.md
VERSION
package.ini
src/Client.php
2015-07-07 14:52:09 +02:00
Daniele Alessandri
cd991e6370
[tests] Remove hhvm-nightly from Travis CI configuration.
...
See https://github.com/travis-ci/travis-ci/issues/3788 for details.
2015-07-07 14:44:28 +02:00
Daniele Alessandri
c59853afb8
[tests] It's 7.0 and not 5.7!
2015-07-07 14:44:08 +02:00
Daniele Alessandri
d4982b6c43
[tests] Add PHP 5.7 to Travis CI configuration.
2015-07-07 13:22:59 +02:00
Daniele Alessandri
96f4af816d
Minor tweak in .editorconfig file.
...
[ci skip]
2015-07-06 18:42:10 +02:00
Daniele Alessandri
22ff3ff992
Commit .editorconfig file.
...
See http://editorconfig.org for more info about EditorConfig
[ci skip]
2015-07-06 18:38:30 +02:00