Skip to content

Commit 3ae908c

Browse files
authored
Merge pull request #127 from andrew-demb/accurate-check-apcu
Reuse more accurate check for APCu availability
2 parents 30b688e + bbb4dbf commit 3ae908c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DependencyInjection/GraphQLiteCompilerPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ private function getAnnotationReader(): AnnotationReader
415415

416416
$doctrineAnnotationReader = new DoctrineAnnotationReader();
417417

418-
if (function_exists('apcu_fetch')) {
418+
if (ApcuAdapter::isSupported()) {
419419
$doctrineAnnotationReader = new PsrCachedReader($doctrineAnnotationReader, new ApcuAdapter('graphqlite'), true);
420420
}
421421

@@ -432,7 +432,7 @@ private function getAnnotationReader(): AnnotationReader
432432
private function getPsr16Cache(): CacheInterface
433433
{
434434
if ($this->cache === null) {
435-
if (function_exists('apcu_fetch')) {
435+
if (ApcuAdapter::isSupported()) {
436436
$this->cache = new Psr16Cache(new ApcuAdapter('graphqlite_bundle'));
437437
} else {
438438
$this->cache = new Psr16Cache(new PhpFilesAdapter('graphqlite_bundle', 0, $this->cacheDir));

0 commit comments

Comments
 (0)