This makes it easier to use Predis in scripts and projects that do
not already include as PSR-0 autoloader.
Signed-off-by: Eric Naeseth <eric@thumbtack.com>
The script that is used to create a single file out of the whole repository can
now accept a list of classes (their full FQN is needed) that must be excluded
when generating the file. The list can be passed directly in the command line
(multiple -e parameters) or in text file that contains a class name on each
line (single -E parameter).
The script does also a basic check to ensure that the user is not excluding a
class that is referenced by other subclasses.
Composer is a package manager for PHP currently under development. You can find
details about Composer at the following URL http://github.com/composer/composer
Now classes that extend Predis\Distribution\HashRing can override how the hash
of a node is retrieved in order to implement different kind of distribution
strategies while reusing the base algorithm.
By default the cURL extension does not trigger any error when fetching a
response with an HTTP code >= 400. Changing this behaviour is also useful to
intercept the 403 error generated when executing Redis commands disallowed
on Webdis by using ACLs.
The cURL extension is easily found already packaged for various Linux
distributions, it provides everything needed and it seems to have a lower
overhead compared to pecl_http.
With Webdis it is possible to define some access control rules to allow or
disallow certain commands and one of the possible configurations is based on
plain old HTTP authentication.
I could have rebased the previous branch with master, but since it was only a
single file and its history was basically meaningless I preferred to start
from scratch.
When PHP's fwrite() ends up writing only a part of $buffer over the network,
this method attempts to automatically write the rest of $buffer. Due to this
bug, the data being already sent to the server was not discarded from $buffer.
Usually fwrite() writes the whole $buffer in one go, but anyway this bug would
not have passed unnoticed since it results in malformed requests and Redis
would have surely returned a -ERR reply.
When a callback is specified, the client does not return a new instance
of Predis\PubSubContext but it invokes that callback on each message
received. The context can be aborted simply by returning FALSE from the
callback.