Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jul 28, 2014
  1. Move command "COMMAND" to the server profile for Redis 2.8.

    authored
    This command has been backported from the "unstable" branch of Redis
    to the "2.8" one, and it is available since 2.8.13.
Commits on Jul 21, 2014
  1. Fetch updated slots map from node indicated by -MOVED response.

    authored
    This optimization makes it possible to fetch the slots map directly
    from the server indicated by the -MOVED response eliminating the need
    to use a random node in the pool, which in turn could require Predis
    to open a new and useless connection.
  2. Fetch cluster slots from node upon first -MOVED response.

    authored
    This is a more sane default as it allows users to indicate only a few
    servers of the whole cluster composition, while it previously required
    a more complex configuration of the client using client options.
    
    This feature can be disabled using the "enableClusterNodes()" method.
Commits on Jul 18, 2014
  1. New command: COMMAND (Redis 3.0.0).

    authored
    The command returns the response as is, but it would probably be not a
    bad idea to parse it to restructure returned info using named arrays,
    making it easier to access single commands and their info.
    
    We will keep it as is for now, and investigate this change later.
Commits on Jul 17, 2014
  1. Switch to CLUSTER SLOTS instead of CLUSTER NODES for redis-cluster.

    authored
    CLUSTER SLOTS returns a structured response easier to handle compared
    to the bulk response of CLUSTER NODES which must be parsed making the
    whole thing more fragile.
    
    CLUSTER SLOTS has been added in Redis 3.0.0b7.
  2. Run php-cs against source code.

    authored
  3. Use same strategy for both client-side sharding and redis-cluster.

    authored
    This change is possible because, after a few changes in redis-cluster,
    our default cluster strategy used for client side sharding and the one
    used for redis-cluster turned out to be exactly the same, except for
    the hashing function used to calculate distribution.
    
    Actually some checks used to enforce correctness are redundant in the
    context of redis-cluster (e.g. the one used to make sure that keys in
    requests performing cross-keys operations will hash to the same slot,
    which is performed by the server) so we could also add a more dumb and
    permissive cluster strategy that relies on checks performed by Redis.
    
    The only difference between the client-side sharding strategy and the
    one used for redis-cluster, aside from the hash function, is in the
    rules used for extracting hash tags from keys since empty tags {} are
    considered valid by redis-cluster. In v1.0.0 the strategy used for our
    client-side sharding cluster will reflect this change, but we will not
    change it in v0.8 since it can be considered a breaking changes as it
    can potentially affect existing cluster deployments.
Commits on Jul 16, 2014
Commits on Jul 14, 2014
  1. Porperly handle -ERR instead of +QUEUED inside MULTI ... EXEC.

    authored
    Error responses such as -OOM or -ERR on invalid arguments in commands
    are returned immediatly instead of +QUEUED when using a transaction,
    which is a condition that had not been tested enough. This condition
    led to a bug in which Predis was not invalidating the transaction, so
    when trying to create a new transaction Redis returned a "-ERR MULTI
    calls can not be nested".
    
    This commit fixes #187.
Commits on Jun 9, 2014
  1. [tests] Use annotations to specify expected Redis server version.

    authored
    This change targets only method annotations and aims to make the body
    of tests more readable using the @requiresRedisVersion annotation.
    
    Tests using this annotation requires to be assigned the "connected"
    group of tests because they create a connection to the Redis instance
    specified in phpunit.xml to fetch its the version.
    
    This is a quick example of how this annotation can be used:
    
        /**
         * @group connected
         * @requiresRedisVersion >= 2.8.9
         */
        public function testExecutedOnlyWithMatchingRedisVersion()
        {
        }
    
    Future improvements (currently not needed) include:
    
      * Same annotation working on a class-level (but still applied only
        to test methods with an explicitly assigned @group connected).
    
      * Ability to specify a version range.
  2. New command: ZRANGEBYLEX (Redis 2.8.9).

    authored
    Closes #175.
  3. New command: ZLEXCOUNT (Redis 2.8.9).

    authored
    Closes #176.
Commits on Jun 3, 2014
  1. Fix parsing of the output of CLUSTER NODES to fetch slots map.

    authored
    There was an error in presence of slaves in the cluster configuration,
    see #165 for reference.
Commits on May 30, 2014
  1. Skip integration tests for HyperLogLog commands on Redis < 2.8.9.

    authored
    Caught this by running the test suite on TravisCI which still runs an
    older version of Redis 2.8. We should find a more decent way to handle
    differences in profiles when commands get added between patch releases
    of Redis, our custom skip method will do for now.
  2. New commands: PFADD, PFCOUNT, PFMERGE (Redis 2.8.9).

    authored
    Backported from the master branch.
    
    Many thanks to @rubensayshi for his initial commits on this in #163,
    but I had to start from scratch for the master branch first.
Commits on Mar 28, 2014
  1. Alexey Kupershtokh
Commits on Mar 25, 2014
Commits on Feb 11, 2014
  1. Fix implementation for hash tags extraction from keys.

    authored
    We now fully comply with the specifications defined by Redis.
  2. Add support for key hash tags in redis-cluster (Redis 3.0.0b1).

    authored
    Multi-keys operations are not allowed even when keys generate the same
    hash but this will probably be supported in later betas of Redis which
    means we will basically end up reusing the whole strategy used for
    client-side sharding.
Commits on Jan 25, 2014
  1. Tang Hongbo
Commits on Jan 8, 2014
  1. [tests] Use Predis\Autoload from include_path when not in repository.

    authored
    This is useful only for running the test suite after installing the
    PEAR package, see #126 for reference.
Commits on Dec 22, 2013
  1. Apply more phpdoc fixes.

    authored
    Backported from 6a577a0 (master).
  2. [tests] No need to reassign $exception.

    authored
    Backported from 728d9dc (master).
  3. Make Pipeline::executeCommand() return $this for fluent interface.

    authored
    Backported from 3befbb3 (master).
  4. Make PhpiredisConnection::getAddress() static and protected.

    authored
    This method is mostly an utility method which is the main reason for
    it bein static, but can be useful to have it available when extending
    this class.
    
    This change was inspired by b9b899e (master) even though the original
    commit is meant to fix an issue not affecting v0.8.
Commits on Dec 19, 2013
Commits on Dec 17, 2013
  1. Run php-cs against test suite.

    authored
Something went wrong with that request. Please try again.