? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
4 Nov 2017

Pull Request for Issue https://travis-ci.org/joomla/joomla-cms/jobs/297187052

Summary of Changes

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.

Testing Instructions

See that travis is happy now.

Expected result

See that travis is happy now.

Actual result

Travis fails with the mention error

Documentation Changes Required

avatar zero-24 zero-24 - open - 4 Nov 2017
avatar zero-24 zero-24 - change - 4 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Nov 2017
Category Libraries
avatar zero-24
zero-24 - comment - 4 Nov 2017
avatar wilsonge
wilsonge - comment - 4 Nov 2017

return (static::$_redis->exists($this->_getCacheId($id, $group)) === 1) is probably simpler?

avatar zero-24
zero-24 - comment - 4 Nov 2017

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.

avatar csthomas
csthomas - comment - 4 Nov 2017

You can also use:

return (bool) static::$_redis->exists($this->_getCacheId($id, $group));
avatar zero-24 zero-24 - change - 4 Nov 2017
Labels Added: ?
avatar zero-24
zero-24 - comment - 4 Nov 2017

pushed the suggestion by @csthomas Thanks ?

avatar wilsonge wilsonge - change - 4 Nov 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-11-04 14:15:05
Closed_By wilsonge
avatar wilsonge wilsonge - close - 4 Nov 2017
avatar wilsonge wilsonge - merge - 4 Nov 2017
avatar wilsonge
wilsonge - comment - 4 Nov 2017

Merged on review

avatar zero-24
zero-24 - comment - 4 Nov 2017

Thanks ?

Add a Comment

Login with GitHub to post a comment