Skip to content

Commit ec58321

Browse files
committed
Merge pull request #1 from thecodingmachine/vaidiep-patch-1
Fix issue with apcu extension
2 parents 8ff5e1a + 308f517 commit ec58321

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
"require" : {
2020
"php" : ">=5.3.0",
21-
"doctrine/cache" : "~1.4",
21+
"doctrine/cache" : "~1.6",
2222
"mouf/utils.constants.debug" : "~1.0",
2323
"mouf/utils.constants.secret" : "~1.0",
2424
"mouf/utils.cache.cache-interface" : "~2.0"
@@ -38,4 +38,4 @@
3838
"logo" : "logo.png"
3939
}
4040
}
41-
}
41+
}

src/CacheInstaller.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public static function install(MoufManager $moufManager) {
2828
$driver = new \\Doctrine\\Common\\Cache\\ArrayCache();
2929
} else {
3030
// If APC is available, let\'s use APC
31-
if (extension_loaded("apc")) {
31+
if (extension_loaded("apcu")) {
32+
$driver = new \\Doctrine\\Common\\Cache\\ApcuCache();
33+
} else if (extension_loaded("apc")) {
3234
$driver = new \\Doctrine\\Common\\Cache\\ApcCache();
3335
} else {
3436
$driver = new \\Doctrine\\Common\\Cache\\FileCache(sys_get_temp_dir().\'/doctrinecache\');

0 commit comments

Comments
 (0)