Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/186' into develop
Browse files Browse the repository at this point in the history
Close #186
Fix #185
  • Loading branch information
michalbundyra committed Aug 29, 2019
2 parents 69ff317 + 45d32ac commit f6be010
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
1 change: 0 additions & 1 deletion .ci/redis.ini

This file was deleted.

14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ matrix:
- APCU_PECL_VERSION="apcu-4.0.8"
- MEMCACHE_PECL_VERSION="memcache-2.2.7"
- MEMCACHED_PECL_VERSION="memcached-2.2.0"
- REDIS_PECL_VERSION="redis-2.2.3"
- TESTS_ZEND_CACHE_EXTMONGODB_ENABLED=false
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=true
- TESTS_ZEND_CACHE_XCACHE_ENABLED=true
Expand All @@ -56,6 +57,7 @@ matrix:
- APCU_PECL_VERSION="apcu-4.0.10"
- MEMCACHE_PECL_VERSION="memcache-3.0.7"
- MEMCACHED_PECL_VERSION="memcached-2.2.0"
- REDIS_PECL_VERSION="redis-3.1.6"
- TESTS_ZEND_CACHE_EXTMONGODB_ENABLED=false
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=true
- TESTS_ZEND_CACHE_XCACHE_ENABLED=true
Expand All @@ -65,6 +67,7 @@ matrix:
- APCU_PECL_VERSION="apcu-4.0.11"
- MEMCACHE_PECL_VERSION="memcache-3.0.8"
- MEMCACHED_PECL_VERSION="memcached-2.2.0"
- REDIS_PECL_VERSION="redis-4.3.0"
- TESTS_ZEND_CACHE_EXTMONGODB_ENABLED=false
- TESTS_ZEND_CACHE_MEMCACHE_ENABLED=true
- TESTS_ZEND_CACHE_XCACHE_ENABLED=true
Expand All @@ -73,6 +76,7 @@ matrix:
- DEPS=lowest
- APCU_PECL_VERSION="apcu-5.1.2"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.0"
- REDIS_PECL_VERSION="redis-4.0.0"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- TESTS_ZEND_CACHE_EXTMONGODB_ENABLED=false
- php: 7
Expand All @@ -81,20 +85,23 @@ matrix:
- LEGACY_DEPS="phpbench/phpbench phpunit/phpunit"
- APCU_PECL_VERSION="apcu-5.1.8"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.2"
- REDIS_PECL_VERSION="redis-5.0.0"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- TESTS_ZEND_CACHE_EXTMONGODB_ENABLED=false
- php: 7
env:
- DEPS=latest
- APCU_PECL_VERSION="apcu"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.3"
- REDIS_PECL_VERSION="redis-5.0.2"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- TESTS_ZEND_CACHE_EXTMONGODB_ENABLED=false
- php: 7.1
env:
- DEPS=lowest
- APCU_PECL_VERSION="apcu-5.1.7"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.2"
- REDIS_PECL_VERSION="redis-4.0.0"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- php: 7.1
env:
Expand All @@ -104,30 +111,35 @@ matrix:
- TEST_COVERAGE=true
- APCU_PECL_VERSION="apcu-5.1.8"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.2"
- REDIS_PECL_VERSION="redis-5.0.0"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- php: 7.1
env:
- DEPS=latest
- APCU_PECL_VERSION="apcu"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.3"
- REDIS_PECL_VERSION="redis-5.0.2"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- php: 7.2
env:
- DEPS=lowest
- APCU_PECL_VERSION="apcu-5.1.10"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.2"
- REDIS_PECL_VERSION="redis-4.0.0"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- php: 7.2
env:
- DEPS=locked
- APCU_PECL_VERSION="apcu-5.1.10"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.2"
- REDIS_PECL_VERSION="redis-5.0.0"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true
- php: 7.2
env:
- DEPS=latest
- APCU_PECL_VERSION="apcu"
- APCU_BC_PECL_VERSION="apcu_bc-1.0.3"
- REDIS_PECL_VERSION="redis-5.0.2"
- TESTS_ZEND_CACHE_MONGODB_USE_POLYFILL=true

before_install:
Expand Down Expand Up @@ -162,7 +174,7 @@ install:
fi ;

- if [[ $TESTS_ZEND_CACHE_REDIS_ENABLED == 'true' ]]; then
phpenv config-add .ci/redis.ini ;
echo "no" | pecl install -f $REDIS_PECL_VERSION ;
fi ;

- if [[ $TESTS_ZEND_CACHE_MEMCACHE_ENABLED == 'true' ]]; then
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ All notable changes to this project will be documented in this file, in reverse

### Changed

- Nothing.
- [#186](https://github.com/zendframework/zend-cache/pull/186) replaces
deprecated `delete()` calls with `del()` in Redis adapter. `delete()`
function is deprecated since version 5.0.0 and `del()` is available
since version 2.1.0.

### Deprecated

Expand All @@ -22,7 +25,7 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- Nothing.

## 2.8.4 - TBD

Expand Down
6 changes: 3 additions & 3 deletions src/Storage/Adapter/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ protected function internalRemoveItem(& $normalizedKey)
{
$redis = $this->getRedisResource();
try {
return (bool) $redis->delete($this->namespacePrefix . $normalizedKey);
return (bool) $redis->del($this->namespacePrefix . $normalizedKey);
} catch (RedisResourceException $e) {
throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
}
Expand Down Expand Up @@ -434,7 +434,7 @@ public function clearByNamespace($namespace)
$options = $this->getOptions();
$prefix = $namespace . $options->getNamespaceSeparator();

$redis->delete($redis->keys($prefix . '*'));
$redis->del($redis->keys($prefix . '*'));

return true;
}
Expand All @@ -460,7 +460,7 @@ public function clearByPrefix($prefix)
$namespace = $options->getNamespace();
$prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix;

$redis->delete($redis->keys($prefix.'*'));
$redis->del($redis->keys($prefix.'*'));

return true;
}
Expand Down

0 comments on commit f6be010

Please sign in to comment.