The class Symfony\Component\Cache\Simple\ArrayCache has been deprecated: since Symfony 4.3, use ArrayAdapter and type-hint for CacheInterface instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
19
$cache = /** @scrutinizer ignore-deprecated */ new ArrayCache();
Loading history...
20
$fileBoundCache = new FileBoundCache($cache, 'prefix');
21
$adapter = new FileBoundMemoryAdapter($fileBoundCache);
22
23
$tmpPath = sys_get_temp_dir().'/tmpCacheTest';
24
touch($tmpPath);
25
26
$adapter->set('foo', 'bar', [
27
$tmpPath
28
]);
29
30
$this->assertSame('bar', $adapter->get('foo'));
31
32
$adapter2 = new FileBoundMemoryAdapter($fileBoundCache);
$tmpPath of type string is incompatible with the type boolean expected by parameter $clear_realpath_cache of clearstatcache().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation