should lifeTime have int type declaration ?
serbancatalin opened this issue · comments
serbancatalin commented
cache/lib/Doctrine/Common/Cache/Cache.php
Line 62 in e3fcea0
Since it is used with null in
and adding a test for null lifeTime fails CouchbaseBucketCacheTest and PhpFileCacheTest
/**
* @dataProvider provideDataToCache
*/
public function testLifeTimeNull($value) : void
{
$cache = $this->_getCacheDriver();
// Test saving a value, checking if it exists, and fetching it back
self::assertTrue($cache->save('key', $value, null));
self::assertTrue($cache->contains('key'));
}
Marco Pivetta commented
Yeah, it should, but adding a type declaration can only be done if we enforce PHP 7.2, as otherwise it counts as a BC break.
serbancatalin commented
I believe int type declaration was added in PHP 7.0
CouchbaseBucketCache usses it
Andreas Braun commented
Closing as we're sunsetting this library. Please see #354 for more details.