Commit Graph

1435 Commits

Author SHA1 Message Date
Daniele Alessandri 3ac4141bcb [bin] Minor fix in comments.
[ci skip]
2013-12-21 10:02:26 +01:00
Daniele Alessandri 587bf0b1e5 [tests] Add $message as third parameter for our custom assertions. 2013-12-19 11:50:39 +01:00
Daniele Alessandri 7cf9cfc496 Update phpdocs.
[ci skip]
2013-12-19 11:20:27 +01:00
Daniele Alessandri f7fea2e430 Update README.
[ci skip]
2013-12-18 16:06:34 +01:00
Daniele Alessandri c51485b318 Update README.
[ci skip]
2013-12-18 16:04:22 +01:00
Daniele Alessandri e1fb9ed1d4 Update README.
[ci skip]
2013-12-18 11:52:19 +01:00
Daniele Alessandri 913bcb3b20 Merge branch 'v0.9/hhvm-compatibility' 2013-12-17 16:37:26 +01:00
Daniele Alessandri 2d23edc691 Add a note about Predis on HHVM in the README. 2013-12-17 16:36:03 +01:00
Daniele Alessandri af2548581e Add HHVM to the build matrix on Travis CI.
We allow failures on builds run against HHVM since it is still being
developed and things could break anytime, but at least this gives us
a decent indicator of the level of compatibility of Predis with this
runtime.
2013-12-17 16:20:48 +01:00
Daniele Alessandri fdf63bc03d Make Predis compatible with HHVM (at least 2.3.0).
Achieving compatibility actually required a few marginal changes:

  - HHVM still has some issues with re-entrant calls to __get(). The
    applied change is an hack simply because it is ugly, but it is not
    wrong and does not break the signature of the options interface.
  - Since we cannot rely on the PHP version to detect the availability
    of socket_import_stream(), we switched to function_exists(). As an
    added bonus, using function_exists() is twice faster.
  - In the test suite we removed an assertion for the message of an
    E_WARNING simply because HHVM emits a different message. Checking
    for the warning is actually enough in that context.

While the whole test suite passes on HHVM 2.3.0, please remember that
HHVM is still in development and things could break anytime especially
in some obscure corner cases.
2013-12-17 16:09:20 +01:00
Daniele Alessandri 2a6409590c Run php-cs against test suite. 2013-12-17 12:55:56 +01:00
Daniele Alessandri 02e43143d3 Run php-cs against codebase. 2013-12-17 12:53:36 +01:00
Daniele Alessandri 5529e33047 Rework classes and interfaces in Predis\Command\Processor namespace.
- Renamed `Predis\Command\Processor\CommandProcessorInterface`
  - Removed `Predis\Command\Processor\CommandProcessorChainInterface`
2013-12-17 10:57:43 +01:00
Daniele Alessandri 1125dc1bdd Apply minor change in command serialization. 2013-12-16 18:46:17 +01:00
Daniele Alessandri feb69fb5f2 Update README.
[ci skip]
2013-12-16 17:05:49 +01:00
Daniele Alessandri 1d31a47cf4 Apply some tweaks to FAQ.
[ci skip]
2013-12-16 16:58:28 +01:00
Daniele Alessandri 35b2c99186 Update FAQ.
[ci skip]
2013-12-16 16:52:04 +01:00
Daniele Alessandri 0f34f41ccf Fix and reword some exception messages. 2013-12-16 15:13:18 +01:00
Daniele Alessandri 43f278fb71 Update testing README.
[ci skip]
2013-12-16 11:47:22 +01:00
Daniele Alessandri b7a7b6838b Merge branch 'v0.9/fix-bin-scripts' 2013-12-15 17:06:05 +01:00
Daniele Alessandri 714f9ddc64 [bin] Drop extension from scripts in the bin directory. 2013-12-15 17:05:30 +01:00
Daniele Alessandri d465de7b42 [bin] Handle duplicate class names or aliases in same namespace.
This condition can occur when merging multiple class files (with their
own independent "use" directives) in one big file: when imported class
names or aliases clashes, the script now tries to automatically rename
them by defining a new alias in the "use" directive and renaming the
occurences in the buffer containing the class code.

This fix is naive at best, but seems to work fine so we will just live
with it for now.
2013-12-15 17:05:07 +01:00
Daniele Alessandri 405ae4af65 [bin] Fix broken rendering of "use ... as ..." in output. 2013-12-15 17:04:55 +01:00
Daniele Alessandri 7e89719ceb Revert usage of "short" namespaces in use directives.
We started using partially-qualified names as an experiment but we are
reverting to using fully-qualified names + aliases in use directives.
2013-12-15 17:00:45 +01:00
Daniele Alessandri aa9aafe926 Remove CHANGELOG.NAMING.md.
Will be most likely replaced by UPGRADING.md or something like that.

[ci skip]
2013-12-15 14:04:52 +01:00
Daniele Alessandri 0779c1c24a Trim some more "use" directives in Predis\Client. 2013-12-15 14:01:05 +01:00
Daniele Alessandri e66c33a444 Merge branch 'v0.9/connection-namespace-1' 2013-12-15 13:44:04 +01:00
Daniele Alessandri 001a7c0827 Update CHANGELOG. 2013-12-15 13:42:47 +01:00
Daniele Alessandri 58c5029574 Rename Predis\Connection\AggregatedConnectionInterface. 2013-12-15 12:38:21 +01:00
Daniele Alessandri 6ceebbfbec Rename Predis\Connection\SingleConnectionInterface::pushInitCommand().
The new name is more explicit as it makes obvious that the commands
added with it will be executed upon connect().
2013-12-15 11:25:38 +01:00
Daniele Alessandri c40ad5dd47 Rename Predis\Connection\ConnectionParameters. 2013-12-15 10:22:23 +01:00
Daniele Alessandri 2a7607f128 Rename Predis\Connection\ConnectionFactory. 2013-12-15 10:09:08 +01:00
Daniele Alessandri 278f89924c Set the test suite to run against Redis 2.8 on Travis CI. 2013-12-14 20:44:10 +01:00
Daniele Alessandri cbf015164c Rename Predis\Client::raw() to Predis\Client::executeRaw().
This is more consistent with Predis\Client::executeRaw() and its more
explicit since simply "raw" as a method name was a bit too vague even
despite being nicely short.
2013-12-14 20:37:28 +01:00
Daniele Alessandri fded76bca3 Merge branch 'v0.9/connection-persistent-path' 2013-12-14 14:16:54 +01:00
Daniele Alessandri e7f2d28f23 Use path to differentiate persistent TCP streams.
Closes #139.
2013-12-14 14:15:41 +01:00
Daniele Alessandri 1c05c878f4 Update CHANGELOG. 2013-12-11 13:11:39 +01:00
Daniele Alessandri 5eb975ef69 Improve URI parsing for connection parameters.
Using PHP's "parse_str()" to parse the query string is slightly more
efficient then our own code especially when the number of fields in
the query string grows, with the additional benefit of supporting
arrays for values when brackets are present in fieldnames.

So after this commit, providing this URI string:

  $string = 'tcp://127.0.0.1?metavars[]=foo&metavars[]=hoge';

Is equivalent to providing the following named array:

  $array = [
    'scheme' => 'tcp',
    'host' => '127.0.0.1',
    'metavars' => ['foo', 'hoge'],
  ];

Aside from this improvement, the URI parsing behavior has not changed.
2013-12-11 12:45:47 +01:00
Daniele Alessandri 3fbc012c03 Add "path" in phpdoc of connections supporting UNIX domain sockets. 2013-12-11 12:20:10 +01:00
Daniele Alessandri cebdf889a4 Rename connection to Predis\Connection\PhpiredisSocketConnection. 2013-12-10 22:14:34 +01:00
Daniele Alessandri 863718bd2b Apply another minor fix to README. 2013-12-10 22:11:40 +01:00
Daniele Alessandri b01ac201d6 Fix README.
[ci skip]
2013-12-10 22:00:53 +01:00
Daniele Alessandri d5bd28958a Minor code styling adjustments. 2013-12-10 21:58:53 +01:00
Daniele Alessandri 95b9f63cab Rename write and read methods of the composable connection interface. 2013-12-10 21:26:11 +01:00
Daniele Alessandri 59b5658cf5 Big batch of phpdoc improvements and minor code styling fixes. 2013-12-10 19:21:52 +01:00
Daniele Alessandri 8744285cb3 Ignoring the plural form of "reply" for renames is dumb...
[ci skip]
2013-12-10 18:08:14 +01:00
Daniele Alessandri 14fda643f7 Replace remaining occurrences of "reply" with "response". 2013-12-10 15:54:41 +01:00
Daniele Alessandri 57e778e098 Tweak CONTRIBUTING.md.
[ci skip]
2013-12-09 12:22:25 +01:00
Daniele Alessandri f9fd4525b5 More minor tweaks in the README.
[ci skip]
2013-12-09 12:07:11 +01:00
Daniele Alessandri ac34983635 Pad headers lines in CHANGELOG.
[ci skip]
2013-12-09 11:46:14 +01:00