[5.4] Make PhpRedis connection more compatible with Predis (pipeline, ...) - #18421
Conversation
…saction, executeRaw)
|
It looks like the old version of phpredis doesn't have |
|
The method I changed |
| - if [[ $TRAVIS_PHP_VERSION != 7.1 ]] ; then phpenv config-rm xdebug.ini; fi | ||
| - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
| - echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
| - pecl install -f redis |
There was a problem hiding this comment.
Why do you reinstall Redis extension?
It is already installed: https://docs.travis-ci.com/user/languages/php#PHP-7.0
There was a problem hiding this comment.
@lucasmichot you're right, but the problem is the installed version. for PHP 7 and 7.1, it's ok, but for PHP 5.6, it has an old version of phpredis extension (< 2.2.7).
This PR makes PhpRedis connection more compatible with Predis. It allows you to use closure for
pipelineortransaction. Also for raw commands, it addsexecuteRaw, same as Predis library.1. Pipeline:
PhpRedis docs: https://github.com/phpredis/phpredis#multi-exec-discard
Predis docs: https://github.com/nrk/predis#command-pipelines
2. Transaction:
PhpRedis docs: https://github.com/phpredis/phpredis#multi-exec-discard
Predis docs: https://github.com/nrk/predis#transactions
3. Raw Commands
Predis Style:
PhpRedis Style:
PhpRedis docs: https://github.com/phpredis/phpredis#rawcommand
Predis docs: https://github.com/nrk/predis#adding-new-commands
Also I added 3 tests for these methods.