User tests: Successful: Unsuccessful:
Pull Request for Issue https://travis-ci.org/joomla/joomla-cms/jobs/297187052
Travis fails with the following error on PHP7.2
1) JCacheStorageRedisTest::testCacheContains
Failed validating data exists in the cache store
Failed asserting that 1 is true.
/home/travis/build/joomla/joomla-cms/tests/unit/core/case/cache.php:81
This is because Redis retruns integer (1/0) for exists see https://redis.io/commands/exists and php7.2 is stricter about that.
See that travis is happy now.
See that travis is happy now.
Travis fails with the mention error
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
return (static::$_redis->exists($this->_getCacheId($id, $group)) === 1)
is probably simpler?
is probably simpler?
hmm i have chose this way to make it crystal clear as this is just a very simple api. For your code you need to look twice.
You can also use:
return (bool) static::$_redis->exists($this->_getCacheId($id, $group));
I mean we already have the delete method doing a similar thing https://github.com/zero-24/joomla-cms/blob/11504de0858b2ec6898b469012317066b6898036/libraries/src/Cache/Storage/RedisStorage.php#L297
Labels |
Added:
?
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-11-04 14:15:05 |
Closed_By | ⇒ | wilsonge |
Merged on review
Thanks
Travis is happy now on 7.2 too? https://travis-ci.org/joomla/joomla-cms/jobs/297200859