CHANGELOG 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. v0.6.0
  2. * Completely switched to the new multi-bulk request protocol for all of the
  3. commands in the Redis 1.2 and Redis 2.0 profiles. Inline and bulk requests
  4. are now deprecated as they will be removed in future releases of Redis.
  5. * Support for Redis 1.0 is now optional and it is provided by requiring
  6. 'Predis_Compatibility.php' before creating an instance of \Predis\Client.
  7. * New commands added to the Redis 2.0 profile since Predis 0.5.1:
  8. - Strings: APPEND, SUBSTR
  9. - ZSets : ZCOUNT, ZRANK, ZUNION, ZINTER, ZREMBYRANK, ZREVRANK
  10. - Hashes : HSET, HINCRBY, HGET, HDEL, HEXISTS, HLEN, HKEYS, HVALS,
  11. HGETALL
  12. - Misc. : DISCARD, CONFIG
  13. * Introduced client-level options with the new Predis\ClientOptions class.
  14. Options can be passed to Predis\Client::__construct in its second argument
  15. as an array or an instance of Predis\ClientOptions. For brevity's sake and
  16. compatibility with older versions, the constructor of Predis\Client still
  17. accepts an instance of Predis\RedisServerProfile in its second argument.
  18. The currently supported client options are:
  19. - profile [default: "2.0" as of Predis 0.6.0]
  20. specifies which server profile to use when connecting to Redis. This
  21. option accepts an instance of Predis\RedisServerProfile or a string
  22. that indicates the target version.
  23. - key_distribution [default: Predis\Utilities\HashRing]
  24. specifies which key distribution algorithm to use to distribute keys
  25. among the servers that compose a cluster. This option accepts an
  26. instance of Predis\Utilities\IRing so that users can implement their
  27. own key distribution strategy. The new Predis\Utilities\KetamaPureRing
  28. class provides a pure-PHP implementation of the Ketama algorithm.
  29. - throw_on_error [default: TRUE]
  30. server errors can optionally be handled "silently": instead of throwing
  31. an exception, the client returns an error response type.
  32. - iterable_multibulk [EXPERIMENTAL - default: FALSE]
  33. in addition to the classic way of fetching a whole multibulk reply
  34. into an array, the client can now optionally stream a multibulk reply
  35. down to the user code by using PHP iterators. It is just a little bit
  36. slower, but it can save a lot of memory in certain scenarios.
  37. * New parameters for connections:
  38. - alias [default: not set]
  39. every connection can now be identified by an alias that is useful to
  40. get a certain connection when connected to a cluster of Redis servers.
  41. - weight [default: not set]
  42. allows the client to balance the keys asymmetrically across multiple
  43. servers. This might be useful when you have servers with different
  44. amounts of memory and you want to distribute the load of your keys
  45. accordingly.
  46. - connection_async [default: FALSE]
  47. estabilish connections to servers in a non-blocking way, so that the
  48. client is not blocked while the underlying resource performs the actual
  49. connection.
  50. - connection_persistent [default: FALSE]
  51. the underlying connection resource is left open when a script ends its
  52. lifecycle. Persistent connections can lead to unpredictable or strange
  53. behaviours, so they should be used with extreme care.
  54. * Connections now support float values for the connection_timeout parameter
  55. to express timeouts with a microsecond resolution.
  56. * CommandPipeline and MultiExecBlock return their instances when invoking
  57. commands, thus allowing method chaining in pipelines and multi-exec blocks.
  58. * MultiExecBlock instances can handle the new DISCARD command.
  59. * The GET parameter for the SORT command now accepts also multiple key
  60. patterns by passing an array of strings.
  61. * KEYS will return a multibulk reply starting from Redis 2.0 (DEV). Predis
  62. handles this change in a backwards-compatible way.
  63. * Switched to class-based handlers instead of anonymous functions to
  64. handle the various server response types.
  65. v0.5.1
  66. * RPOPLPUSH has been changed from bulk command to inline command in Redis
  67. 1.2.1, so ListPopLastPushHead now extends InlineCommand. The old RPOPLPUSH
  68. behavior is still available via the ListPopLastPushHeadBulk class so that
  69. you can override the server profile if you need the old (and uncorrect)
  70. behaviour when connecting to a Redis 1.2.0 instance.
  71. * Added missing support for BGREWRITEAOF for Redis >= 1.2.0
  72. * Implemented a factory method for the RedisServerProfile class to ease the
  73. creation of new server profile instances based on a version string.
  74. v0.5.0
  75. * First versioned release of Predis