Project

General

Profile

1 27204 antonis.le
v0.8.6 (2014-xx-xx)
2
================================================================================
3
4
- Switched to Redis 2.8 as the default server profile as there are no changes
5
  that would break compatibility with previous releases.
6
7
- Minor tweaks to make this version of Predis compatible with HHVM >= 2.4.0.
8
9
- Add support for key hash tags when using redis-cluster (Redis 3.0.0b1).
10
11
- __FIX__: redis-sentinel does not break the parsing of responses to `INFO`.
12
13
14
v0.8.5 (2014-01-16)
15
================================================================================
16
17
- Added `2.8` in the server profiles aliases list for Redis 2.8. `2.6` is still
18
  the default server profile and `dev` now targets Redis 3.0.
19
20
- Added `SCAN`, `SSCAN`, `ZSCAN`, `HSCAN` to the server profile for Redis 2.8.
21
22
- Implemented PHP iterators for incremental iterations over Redis collections:
23
24
    - keyspace (cursor-based iterator using `SCAN`)
25
    - sets (cursor-based iterator using `SSCAN`)
26
    - sorted sets (cursor-based iterator using `ZSCAN`)
27
    - hashes (cursor-based iterator using `HSCAN`)
28
    - lists (plain iterator using `LRANGE`)
29
30
- It is now possible to execute "raw commands" using `Predis\Command\RawCommand`
31
  and a variable list of command arguments. Input arguments are not filtered and
32
  responses are not parsed, which means arguments must follow the signature of
33
  the command as defined by Redis and complex responses are left untouched.
34
35
- URI parsing for connection parameters has been improved and has slightly less
36
  overhead when the number of fields in the querystring grows. New features are:
37
38
    - Parsing does not break when value of a field contains one or more "=".
39
    - Repeated fieldnames using [] produce an array of values.
40
    - Empty or incomplete "key=value" pairs result in an empty string for "key".
41
42
- Various improvements and fixes to the redis-cluster connection backend:
43
44
    - __FIX__: the `ASKING` command is sent upon -ASK redirections.
45
    - An updated slots-map can be fetched from nodes using the `CLUSTER NODES`
46
      command. By default this is a manual operation but can be enabled to get
47
      automatically done upon -MOVED redirections.
48
    - It is possible to specify a common set of connection parameters that are
49
      applied to connections created on the fly upon redirections to nodes not
50
      part of the initial pool.
51
52
- List of deprecated methods:
53
54
    - `Predis\Client::multiExec()`: superseded by `Predis\Client::transaction()`
55
      and to be removed in the next major release.
56
    - `Predis\Client::pubSub()`: superseded by `Predis\Client::pubSubLoop()` and
57
      to be removed in the next major release. This change was needed due to the
58
      recently introduced `PUBSUB` command in Redis 2.8.
59
60
61
v0.8.4 (2013-07-27)
62
================================================================================
63
64
- Added `DUMP` and `RESTORE` to the server profile for Redis 2.6.
65
66
- Connection exceptions now report basic host details in their messages.
67
68
- Allow `Predis\Connection\PhpiredisConnection` to use a random IP when a host
69
  actually has several IPs (ISSUE #116).
70
71
- __FIX__: allow `HMSET` when using a cluster of Redis nodes with client-side
72
  sharding or redis-cluster (ISSUE #106).
73
74
- __FIX__: set `WITHSCORES` modifer for `ZRANGE`, `ZREVRANGE`, `ZRANGEBYSCORE`
75
  and `ZREVRANGEBYSCORE` only when the options array passed to these commands
76
  has `WITHSCORES` set to `true` (ISSUE #107).
77
78
- __FIX__: scripted commands falling back from `EVALSHA` to `EVAL` resulted in
79
  PHP errors when using a prefixed client (ISSUE #109).
80
81
- __FIX__: `Predis\PubSub\DispatcherLoop` now works properly when using key
82
  prefixing (ISSUE #114).
83
84
85
v0.8.3 (2013-02-18)
86
================================================================================
87
88
- Added `CLIENT SETNAME` and `CLIENT GETNAME` (ISSUE #102).
89
90
- Implemented the `Predis\Connection\PhpiredisStreamConnection` class using the
91
  `phpiredis` extension like `Predis\Connection\PhpiredisStreamConnection`, but
92
  without requiring the `socket` extension since it relies on PHP's streams.
93
94
- Added support for the TCP_NODELAY flag via the `tcp_nodelay` parameter for
95
  stream-based connections, namely `Predis\Connection\StreamConnection` and
96
  `Predis\Connection\PhpiredisStreamConnection` (requires PHP >= 5.4.0).
97
98
- Updated the aggregated connection class for redis-cluster to work with 16384
99
  hash slots instead of 4096 to reflect the recent change from redis unstable
100
  ([see this commit](https://github.com/antirez/redis/commit/ebd666d)).
101
102
- The constructor of `Predis\Client` now accepts a callable as first argument
103
  returning `Predis\Connection\ConnectionInterface`. Users can create their
104
  own self-contained strategies to create and set up the underlying connection.
105
106
- Users should return `0` from `Predis\Command\ScriptedCommand::getKeysCount()`
107
  instead of `FALSE` to indicate that all of the arguments of a Lua script must
108
  be used to populate `ARGV[]`. This does not represent a breaking change.
109
110
- The `Predis\Helpers` class has been deprecated and it will be removed in
111
  future releases.
112
113
114
v0.8.2 (2013-02-03)
115
================================================================================
116
117
- Added `Predis\Session\SessionHandler` to make it easy to store PHP sessions
118
  on Redis using Predis. Please note that this class needs either PHP >= 5.4.0
119
  or a polyfill for PHP's `SessionHandlerInterface`.
120
121
- Added the ability to get the default value of a client option directly from
122
  `Predis\Option\ClientOption` using the `getDefault()` method by passing the
123
  option name or its instance.
124
125
- __FIX__: the standard pipeline executor was not using the response parser
126
  methods associated to commands to process raw responses (ISSUE #101).
127
128
129
v0.8.1 (2013-01-19)
130
================================================================================
131
132
- The `connections` client option can now accept a callable object returning
133
  an instance of `Predis\Connection\ConnectionFactoryInterface`.
134
135
- Client options accepting callable objects as factories now pass their actual
136
  instance to the callable as the second argument.
137
138
- `Predis\Command\Processor\KeyPrefixProcessor` can now be directly casted to
139
  string to obtain the current prefix, useful with string interpolation.
140
141
- Added an optional callable argument to `Predis\Cluster\Distribution\HashRing`
142
  and `Predis\Cluster\Distribution\KetamaPureRing` constructor that can be used
143
  to customize how the distributor should extract the connection hash when
144
  initializing the nodes distribution (ISSUE #36).
145
146
- Correctly handle `TTL` and `PTTL` returning -2 on non existing keys starting
147
  with Redis 2.8.
148
149
- __FIX__: a missing use directive in `Predis\Transaction\MultiExecContext`
150
  caused PHP errors when Redis did not return `+QUEUED` replies to commands
151
  when inside a MULTI / EXEC context.
152
153
- __FIX__: the `parseResponse()` method implemented for a scripted command was
154
  ignored when retrying to execute a Lua script by falling back to `EVAL` after
155
  a `-NOSCRIPT` error (ISSUE #94).
156
157
- __FIX__: when subclassing `Predis\Client` the `getClientFor()` method returns
158
  a new instance of the subclass instead of a new instance of `Predis\Client`.
159
160
161
v0.8.0 (2012-10-23)
162
================================================================================
163
164
- The default server profile for Redis is now `2.6`.
165
166
- Certain connection parameters have been renamed:
167
168
  - `connection_async` is now `async_connect`
169
  - `connection_timeout` is now `timeout`
170
  - `connection_persistent` is now `persistent`
171
172
- The `throw_errors` connection parameter has been removed and replaced by the
173
  new `exceptions` client option since exceptions on `-ERR` replies returned by
174
  Redis are not generated by connection classes anymore but instead are thrown
175
  by the client class and other abstractions such as pipeline contexts.
176
177
- Added smart support for redis-cluster (Redis v3.0) in addition to the usual
178
  cluster implementation that uses client-side sharding.
179
180
- Various namespaces and classes have been renamed to follow rules inspired by
181
  the Symfony2 naming conventions.
182
183
- The second argument of the constructor of `Predis\Client` does not accept
184
  strings or instances of `Predis\Profile\ServerProfileInterface` anymore.
185
  To specify a server profile you must explicitly set `profile` in the array
186
  of client options.
187
188
- `Predis\Command\ScriptedCommand` internally relies on `EVALSHA` instead of
189
  `EVAL` thus avoiding to send Lua scripts bodies on each request. The client
190
  automatically resends the command falling back to `EVAL` when Redis returns a
191
  `-NOSCRIPT` error. Automatic fallback to `EVAL` does not work with pipelines,
192
  inside a `MULTI / EXEC` context or with plain `EVALSHA` commands.
193
194
- Complex responses are no more parsed by connection classes as they must be
195
  processed by consumer classes using the handler associated to the issued
196
  command. This means that executing commands directly on connections only
197
  returns simple Redis types, but nothing changes when using `Predis\Client`
198
  or the provided abstractions for pipelines and transactions.
199
200
- Iterators for multi-bulk replies now skip the response parsing method of the
201
  command that generated the response and are passed directly to user code.
202
  Pipeline and transaction objects still consume automatically iterators.
203
204
- Cluster and replication connections now extend a new common interface,
205
  `Predis\Connection\AggregatedConnectionInterface`.
206
207
- `Predis\Connection\MasterSlaveReplication` now uses an external strategy
208
  class to handle the logic for checking readable / writable commands and Lua
209
  scripts.
210
211
- Command pipelines have been optimized for both speed and code cleanness, but
212
  at the cost of bringing a breaking change in the signature of the interface
213
  for pipeline executors.
214
215
- Added a new pipeline executor that sends commands wrapped in a MULTI / EXEC
216
  context to make the execution atomic: if a pipeline fails at a certain point
217
  then the whole pipeline is discarded.
218
219
- The key-hashing mechanism for commands is now handled externally and is no
220
  more a competence of each command class. This change is neeeded to support
221
  both client-side sharding and Redis cluster.
222
223
- `Predis\Options\Option` is now abstract, see `Predis\Option\AbstractOption`.
224
225
226
v0.7.3 (2012-06-01)
227
================================================================================
228
229
- New commands available in the Redis v2.6 profile (dev): `BITOP`, `BITCOUNT`.
230
231
- When the number of keys `Predis\Commands\ScriptedCommand` is negative, Predis
232
  will count from the end of the arguments list to calculate the actual number
233
  of keys that will be interpreted as elements for `KEYS` by the underlying
234
  `EVAL` command.
235
236
- __FIX__: `examples\CustomDistributionStrategy.php` had a mistyped constructor
237
  call and produced a bad distribution due to an error as pointed in ISSUE #63.
238
  This bug is limited to the above mentioned example and does not affect the
239
  classes implemented in the `Predis\Distribution` namespace.
240
241
- __FIX__: `Predis\Commands\ServerEvalSHA::getScriptHash()` was calculating the
242
  hash while it just needs to return the first argument of the command.
243
244
- __FIX__: `Predis\Autoloader` has been modified to allow cascading autoloaders
245
  for the `Predis` namespace.
246
247
248
v0.7.2 (2012-04-01)
249
================================================================================
250
251
- Added `2.6` in the server profiles aliases list for the upcoming Redis 2.6.
252
  `2.4` is still the default server profile. `dev` now targets Redis 2.8.
253
254
- Connection instances can be serialized and unserialized using `serialize()`
255
  and `unserialize()`. This is handy in certain scenarios such as client-side
256
  clustering or replication to lower the overhead of initializing a connection
257
  object with many sub-connections since unserializing them can be up to 5x
258
  times faster.
259
260
- Reworked the default autoloader to make it faster. It is also possible to
261
  prepend it in PHP's autoload stack.
262
263
- __FIX__: fixed parsing of the payload returned by `MONITOR` with Redis 2.6.
264
265
266
v0.7.1 (2011-12-27)
267
================================================================================
268
269
- The PEAR channel on PearHub has been deprecated in favour of `pear.nrk.io`.
270
271
- Miscellaneous minor fixes.
272
273
- Added transparent support for master / slave replication configurations where
274
  write operations are performed on the master server and read operations are
275
  routed to one of the slaves. Please refer to ISSUE #21 for a bit of history
276
  and more details about replication support in Predis.
277
278
- The `profile` client option now accepts a callable object used to initialize
279
  a new instance of `Predis\Profiles\IServerProfile`.
280
281
- Exposed a method for MULTI / EXEC contexts that adds the ability to execute
282
  instances of Redis commands against transaction objects.
283
284
285
v0.7.0 (2011-12-11)
286
================================================================================
287
288
- Predis now adheres to the PSR-0 standard which means that there is no more a
289
  single file holding all the classes of the library, but multiple files (one
290
  for each class). You can use any PSR-0 compatible autoloader to load Predis
291
  or just leverage the default one shipped with the library by requiring the
292
  `Predis/Autoloader.php` and call `Predis\Autoloader::register()`.
293
294
- The default server profile for Redis is now 2.4. The `dev` profile supports
295
  all the features of Redis 2.6 (currently unstable) such as Lua scripting.
296
297
- Support for long aliases (method names) for Redis commands has been dropped.
298
299
- Redis 1.0 is no more supported. From now on Predis will use only the unified
300
  protocol to serialize commands.
301
302
- It is possible to prefix keys transparently on a client-level basis with the
303
  new `prefix` client option.
304
305
- An external connection factory is used to initialize new connection instances
306
  and developers can now register their own connection classes using the new
307
  `connections` client option.
308
309
- It is possible to connect locally to Redis using UNIX domain sockets. Just
310
  use `unix:///path/to/redis.sock` or a named array just like in the following
311
  example: `array('scheme' => 'unix', 'path' => '/path/to/redis.sock');`.
312
313
- If the `phpiredis` extension is loaded by PHP, it is now possible to use an
314
  alternative connection class that leverages it to make Predis faster on many
315
  cases, especially when dealing with big multibulk replies, with the the only
316
  downside that persistent connections are not supported. Please refer to the
317
  documentation to see how to activate this class using the new `connections`
318
  client option.
319
320
- Predis is capable to talk with Webdis, albeit with some limitations such as
321
  the lack of pipelining and transactions, just by using the `http` scheme in
322
  in the connection parameters. All is needed is PHP with the `curl` and the
323
  `phpiredis` extensions loaded.
324
325
- Way too many changes in the public API to make a list here, we just tried to
326
  make all the Redis commands compatible with previous releases of v0.6 so that
327
  you do not have to worry if you are simply using Predis as a client. Probably
328
  the only breaking changes that should be mentioned here are:
329
330
  - `throw_on_error` has been renamed to `throw_errors` and it is a connection
331
    parameter instead of a client option, along with `iterable_multibulk`.
332
333
  - `key_distribution` has been removed from the client options. To customize
334
    the distribution strategy you must provide a callable object to the new
335
    `cluster` client option to configure and then return a new instance of
336
    `Predis\Network\IConnectionCluster`.
337
338
  - `Predis\Client::create()` has been removed. Just use the constructor to set
339
    up a new instance of `Predis\Client`.
340
341
  - `Predis\Client::pipelineSafe()` was deprecated in Predis v0.6.1 and now has
342
    finally removed. Use `Predis\Client::pipeline(array('safe' => true))`.
343
344
  - `Predis\Client::rawCommand()` has been removed due to inconsistencies with
345
    the underlying connection abstractions. You can still get the raw resource
346
    out of a connection with `Predis\Network\IConnectionSingle::getResource()`
347
    so that you can talk directly with Redis.
348
349
- The `Predis\MultiBulkCommand` class has been merged into `Predis\Command` and
350
  thus removed. Serialization of commands is now a competence of connections.
351
352
- The `Predis\IConnection` interface has been splitted into two new interfaces:
353
  `Predis\Network\IConnectionSingle` and `Predis\Network\IConnectionCluster`.
354
355
- The constructor of `Predis\Client` now accepts more type of arguments such as
356
  instances of `Predis\IConnectionParameters` and `Predis\Network\IConnection`.
357
358
359
v0.6.6 (2011-04-01)
360
================================================================================
361
362
- Switched to Redis 2.2 as the default server profile (there are no changes
363
  that would break compatibility with previous releases). Long command names
364
  are no more supported by default but if you need them you can still require
365
  `Predis_Compatibility.php` to avoid breaking compatibility.
366
367
- Added a `VERSION` constant to `Predis\Client`.
368
369
- Some performance improvements for multibulk replies (parsing them is about
370
  16% faster than the previous version). A few core classes have been heavily
371
  optimized to reduce overhead when creating new instances.
372
373
- Predis now uses by default a new protocol reader, more lightweight and
374
  faster than the default handler-based one. Users can revert to the old
375
  protocol reader with the `reader` client option set to `composable`.
376
  This client option can also accept custom reader classes implementing the
377
  new `Predis\IResponseReader` interface.
378
379
- Added support for connecting to Redis using UNIX domain sockets (ISSUE #25).
380
381
- The `read_write_timeout` connection parameter can now be set to 0 or false
382
  to disable read and write timeouts on connections. The old behaviour of -1
383
  is still intact.
384
385
- `ZUNIONSTORE` and `ZINTERSTORE` can accept an array to specify a list of the
386
  source keys to be used to populate the destination key.
387
388
- `MGET`, `SINTER`, `SUNION` and `SDIFF` can accept an array to specify a list
389
  of keys. `SINTERSTORE`, `SUNIONSTORE` and `SDIFFSTORE` can also accept an
390
  array to specify the list of source keys.
391
392
- `SUBSCRIBE` and `PSUBSCRIBE` can accept a list of channels for subscription.
393
394
- __FIX__: some client-side clean-ups for `MULTI/EXEC` were handled incorrectly
395
  in a couple of corner cases (ISSUE #27).
396
397
398
v0.6.5 (2011-02-12)
399
================================================================================
400
401
- __FIX__: due to an untested internal change introduced in v0.6.4, a wrong
402
  handling of bulk reads of zero-length values was producing protocol
403
  desynchronization errors (ISSUE #20).
404
405
406
v0.6.4 (2011-02-12)
407
================================================================================
408
409
- Various performance improvements (15% ~ 25%) especially when dealing with
410
  long multibulk replies or when using clustered connections.
411
412
- Added the `on_retry` option to `Predis\MultiExecBlock` that can be used to
413
  specify an external callback (or any callable object) that gets invoked
414
  whenever a transaction is aborted by the server.
415
416
- Added inline (p)subscribtion via options when initializing an instance of
417
  `Predis\PubSubContext`.
418
419
420
v0.6.3 (2011-01-01)
421
================================================================================
422
423
- New commands available in the Redis v2.2 profile (dev):
424
  - Strings: `SETRANGE`, `GETRANGE`, `SETBIT`, `GETBIT`
425
  - Lists  : `BRPOPLPUSH`
426
427
- The abstraction for `MULTI/EXEC` transactions has been dramatically improved
428
  by providing support for check-and-set (CAS) operations when using Redis >=
429
  2.2. Aborted transactions can also be optionally replayed in automatic up
430
  to a user-defined number of times, after which a `Predis\AbortedMultiExec`
431
  exception is thrown.
432
433
434
v0.6.2 (2010-11-28)
435
================================================================================
436
437
- Minor internal improvements and clean ups.
438
439
- New commands available in the Redis v2.2 profile (dev):
440
  - Strings: `STRLEN`
441
  - Lists  : `LINSERT`, `RPUSHX`, `LPUSHX`
442
  - ZSets  : `ZREVRANGEBYSCORE`
443
  - Misc.  : `PERSIST`
444
445
- WATCH also accepts a single array parameter with the keys that should be
446
  monitored during a transaction.
447
448
- Improved the behaviour of `Predis\MultiExecBlock` in certain corner cases.
449
450
- Improved parameters checking for the SORT command.
451
452
- __FIX__: the `STORE` parameter for the `SORT` command didn't work correctly
453
  when using `0` as the target key (ISSUE #13).
454
455
- __FIX__: the methods for `UNWATCH` and `DISCARD` do not break anymore method
456
  chaining with `Predis\MultiExecBlock`.
457
458
459
v0.6.1 (2010-07-11)
460
================================================================================
461
462
- Minor internal improvements and clean ups.
463
464
- New commands available in the Redis v2.2 profile (dev):
465
  - Misc.  : `WATCH`, `UNWATCH`
466
467
- Optional modifiers for `ZRANGE`, `ZREVRANGE` and `ZRANGEBYSCORE` queries are
468
  supported using an associative array passed as the last argument of their
469
  respective methods.
470
471
- The `LIMIT` modifier for `ZRANGEBYSCORE` can be specified using either:
472
  - an indexed array: `array($offset, $count)`
473
  - an associative array: `array('offset' => $offset, 'count' => $count)`
474
475
- The method `Predis\Client::__construct()` now accepts also instances of
476
  `Predis\ConnectionParameters`.
477
478
- `Predis\MultiExecBlock` and `Predis\PubSubContext` now throw an exception
479
  when trying to create their instances using a profile that does not
480
  support the required Redis commands or when the client is connected to
481
  a cluster of connections.
482
483
- Various improvements to `Predis\MultiExecBlock`:
484
  - fixes and more consistent behaviour across various usage cases.
485
  - support for `WATCH` and `UNWATCH` when using the current development
486
    profile (Redis v2.2) and aborted transactions.
487
488
- New signature for `Predis\Client::multiExec()` which is now able to accept
489
  an array of options for the underlying instance of `Predis\MultiExecBlock`.
490
  Backwards compatibility with previous releases of Predis is ensured.
491
492
- New signature for `Predis\Client::pipeline()` which is now able to accept
493
  an array of options for the underlying instance of Predis\CommandPipeline.
494
  Backwards compatibility with previous releases of Predis is ensured.
495
  The method `Predis\Client::pipelineSafe()` is to be considered deprecated.
496
497
- __FIX__: The `WEIGHT` modifier for `ZUNIONSTORE` and `ZINTERSTORE` was
498
  handled incorrectly with more than two weights specified.
499
500
501
v0.6.0 (2010-05-24)
502
================================================================================
503
504
- Switched to the new multi-bulk request protocol for all of the commands
505
  in the Redis 1.2 and Redis 2.0 profiles. Inline and bulk requests are now
506
  deprecated as they will be removed in future releases of Redis.
507
508
- The default server profile is `2.0` (targeting Redis 2.0.x). If you are
509
  using older versions of Redis, it is highly recommended that you specify
510
  which server profile the client should use (e.g. `1.2` when connecting
511
  to instances of Redis 1.2.x).
512
513
- Support for Redis 1.0 is now optional and it is provided by requiring
514
  'Predis_Compatibility.php' before creating an instance of `Predis\Client`.
515
516
- New commands added to the Redis 2.0 profile since Predis 0.5.1:
517
  - Strings: `SETEX`, `APPEND`, `SUBSTR`
518
  - ZSets  : `ZCOUNT`, `ZRANK`, `ZUNIONSTORE`, `ZINTERSTORE`, `ZREMBYRANK`,
519
             `ZREVRANK`
520
  - Hashes : `HSET`, `HSETNX`, `HMSET`, `HINCRBY`, `HGET`, `HMGET`, `HDEL`,
521
             `HEXISTS`, `HLEN`, `HKEYS`, `HVALS`, `HGETALL`
522
  - PubSub : `PUBLISH`, `SUBSCRIBE`, `UNSUBSCRIBE`
523
  - Misc.  : `DISCARD`, `CONFIG`
524
525
- Introduced client-level options with the new `Predis\ClientOptions` class.
526
  Options can be passed to the constructor of `Predis\Client` in its second
527
  argument as an array or an instance of `Predis\ClientOptions`. For brevity's
528
  sake and compatibility with older versions, the constructor still accepts
529
  an instance of `Predis\RedisServerProfile` in its second argument. The
530
  currently supported client options are:
531
532
  - `profile` [default: `2.0` as of Predis 0.6.0]: specifies which server
533
    profile to use when connecting to Redis. This option accepts an instance
534
    of `Predis\RedisServerProfile` or a string that indicates the version.
535
536
  - `key_distribution` [default: `Predis\Distribution\HashRing`]: specifies
537
    which key distribution strategy to use to distribute keys among the
538
    servers that compose a cluster. This option accepts an instance of
539
    `Predis\Distribution\IDistributionStrategy` so that users can implement
540
    their own key distribution strategy. `Predis\Distribution\KetamaPureRing`
541
    is an alternative distribution strategy providing a pure-PHP implementation
542
    of the same algorithm used by libketama.
543
544
  - `throw_on_error` [default: `TRUE`]: server errors can optionally be handled
545
    "silently": instead of throwing an exception, the client returns an error
546
    response type.
547
548
  - `iterable_multibulk` [EXPERIMENTAL - default: `FALSE`]: in addition to the
549
    classic way of fetching a whole multibulk reply into an array, the client
550
    can now optionally stream a multibulk reply down to the user code by using
551
    PHP iterators. It is just a little bit slower, but it can save a lot of
552
    memory in certain scenarios.
553
554
- New parameters for connections:
555
556
  - `alias` [default: not set]: every connection can now be identified by an
557
    alias that is useful to get a specific connections when connected to a
558
    cluster of Redis servers.
559
  - `weight` [default: not set]: allows to balance keys asymmetrically across
560
    multiple servers. This is useful when you have servers with different
561
    amounts of memory to distribute the load of your keys accordingly.
562
  - `connection_async` [default: `FALSE`]: estabilish connections to servers
563
    in a non-blocking way, so that the client is not blocked while the socket
564
    resource performs the actual connection.
565
  - `connection_persistent` [default: `FALSE`]: the underlying socket resource
566
    is left open when a script ends its lifecycle. Persistent connections can
567
    lead to unpredictable or strange behaviours, so they should be used with
568
    extreme care.
569
570
- Introduced the `Predis\Pipeline\IPipelineExecutor` interface. Classes that
571
  implements this interface are used internally by the `Predis\CommandPipeline`
572
  class to change the behaviour of the pipeline when writing/reading commands
573
  from one or multiple servers. Here is the list of the default executors:
574
575
  - `Predis\Pipeline\StandardExecutor`: exceptions generated by server errors
576
    might be thrown depending on the options passed to the client (see the
577
    `throw_on_error` client option). Instead, protocol or network errors always
578
    throw exceptions. This is the default executor for single and clustered
579
    connections and shares the same behaviour of Predis 0.5.x.
580
  - `Predis\Pipeline\SafeExecutor`: exceptions generated by server, protocol
581
    or network errors are not thrown but returned in the response array as
582
    instances of `Predis\ResponseError` or `Predis\CommunicationException`.
583
  - `Predis\Pipeline\SafeClusterExecutor`: this executor shares the same
584
    behaviour of `Predis\Pipeline\SafeExecutor` but it is geared towards
585
    clustered connections.
586
587
- Support for PUB/SUB is handled by the new `Predis\PubSubContext` class, which
588
  could also be used to build a callback dispatcher for PUB/SUB scenarios.
589
590
- When connected to a cluster of connections, it is now possible to get a
591
  new `Predis\Client` instance for a single connection of the cluster by
592
  passing its alias/index to the new `Predis\Client::getClientFor()` method.
593
594
- `Predis\CommandPipeline` and `Predis\MultiExecBlock` return their instances
595
  when invokink commands, thus allowing method chaining in pipelines and
596
  multi-exec blocks.
597
598
- `Predis\MultiExecBlock` can handle the new `DISCARD` command.
599
600
- Connections now support float values for the `connection_timeout` parameter
601
  to express timeouts with a microsecond resolution.
602
603
- __FIX__: TCP connections now respect the read/write timeout parameter when
604
  reading the payload of server responses. Previously, `stream_get_contents()`
605
  was being used internally to read data from a connection but it looks like
606
  PHP does not honour the specified timeout for socket streams when inside
607
  this function.
608
609
- __FIX__: The `GET` parameter for the `SORT` command now accepts also multiple
610
  key patterns by passing an array of strings. (ISSUE #1).
611
612
* __FIX__: Replies to the `DEL` command return the number of elements deleted
613
  by the server and not 0 or 1 interpreted as a boolean response. (ISSUE #4).
614
615
616
v0.5.1 (2010-01-23)
617
================================================================================
618
619
* `RPOPLPUSH` has been changed from bulk command to inline command in Redis
620
  1.2.1, so `ListPopLastPushHead` now extends `InlineCommand`. The old behavior
621
  is still available via the `ListPopLastPushHeadBulk` class so that you can
622
  override the server profile if you need the old (and uncorrect) behaviour
623
  when connecting to a Redis 1.2.0 instance.
624
625
* Added missing support for `BGREWRITEAOF` for Redis >= 1.2.0.
626
627
* Implemented a factory method for the `RedisServerProfile` class to ease the
628
  creation of new server profile instances based on a version string.
629
630
631
v0.5.0 (2010-01-09)
632
================================================================================
633
* First versioned release of Predis