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
17
$cache = /** @scrutinizer ignore-deprecated */ new ArrayCache();
Loading history...
18
$fileBoundCache = new FileBoundCache($cache, 'prefix');
19
$classBoundCache = new ClassBoundCache($fileBoundCache, true, true, true);
20
$classBoundCacheContract = new ClassBoundCacheContract($classBoundCache);
21
22
$val = 0;
23
24
$newVal = $classBoundCacheContract->get(new ReflectionClass(A::class), function() use (&$val) {
25
return ++$val;
26
});
27
28
$this->assertSame(1, $newVal);
29
30
$newVal2 = $classBoundCacheContract->get(new ReflectionClass(A::class), function() use (&$val) {
$classToTouch->getFileName() 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