From 0845b61c546c6d0c828ee729febba9336015fc4f Mon Sep 17 00:00:00 2001 From: Pierre Vaidie Date: Wed, 23 Mar 2016 11:43:30 +0100 Subject: [PATCH 1/5] Fix issue with apcu extension Let's now check for the extension "apcu" for php 7. TODO : The class FileCache is now an abstract class so we cant' instantiate it directly. --- src/CacheInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CacheInstaller.php b/src/CacheInstaller.php index e9b5981..1329b61 100644 --- a/src/CacheInstaller.php +++ b/src/CacheInstaller.php @@ -28,7 +28,7 @@ public static function install(MoufManager $moufManager) { $driver = new \\Doctrine\\Common\\Cache\\ArrayCache(); } else { // If APC is available, let\'s use APC - if (extension_loaded("apc")) { + if (extension_loaded("apc") || extension_loaded("apcu")) { $driver = new \\Doctrine\\Common\\Cache\\ApcCache(); } else { $driver = new \\Doctrine\\Common\\Cache\\FileCache(sys_get_temp_dir().\'/doctrinecache\'); From b60ad441f0e91bf5be50d4d3e53efe707604163f Mon Sep 17 00:00:00 2001 From: Pierre Vaidie Date: Wed, 23 Mar 2016 11:54:04 +0100 Subject: [PATCH 2/5] Update CacheInstaller.php --- src/CacheInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CacheInstaller.php b/src/CacheInstaller.php index 1329b61..b93fbc4 100644 --- a/src/CacheInstaller.php +++ b/src/CacheInstaller.php @@ -29,7 +29,7 @@ public static function install(MoufManager $moufManager) { } else { // If APC is available, let\'s use APC if (extension_loaded("apc") || extension_loaded("apcu")) { - $driver = new \\Doctrine\\Common\\Cache\\ApcCache(); + $driver = new \\Doctrine\\Common\\Cache\\ApcuCache(); } else { $driver = new \\Doctrine\\Common\\Cache\\FileCache(sys_get_temp_dir().\'/doctrinecache\'); } From 526e5788a82df8bef7fe38c0297e61fa2a5a0589 Mon Sep 17 00:00:00 2001 From: Pierre Vaidie Date: Wed, 23 Mar 2016 11:54:52 +0100 Subject: [PATCH 3/5] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 12613bf..c2e5862 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "require" : { "php" : ">=5.3.0", - "doctrine/cache" : "~1.4", + "doctrine/cache" : "~1.6", "mouf/utils.constants.debug" : "~1.0", "mouf/utils.constants.secret" : "~1.0", "mouf/utils.cache.cache-interface" : "~2.0" @@ -38,4 +38,4 @@ "logo" : "logo.png" } } -} \ No newline at end of file +} From da14f7d821e52c474d964c50c4f22be500a9f386 Mon Sep 17 00:00:00 2001 From: Pierre Vaidie Date: Wed, 23 Mar 2016 12:09:05 +0100 Subject: [PATCH 4/5] Update CacheInstaller.php --- src/CacheInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CacheInstaller.php b/src/CacheInstaller.php index b93fbc4..fb83dff 100644 --- a/src/CacheInstaller.php +++ b/src/CacheInstaller.php @@ -28,7 +28,7 @@ public static function install(MoufManager $moufManager) { $driver = new \\Doctrine\\Common\\Cache\\ArrayCache(); } else { // If APC is available, let\'s use APC - if (extension_loaded("apc") || extension_loaded("apcu")) { + if (extension_loaded("apcu")) { $driver = new \\Doctrine\\Common\\Cache\\ApcuCache(); } else { $driver = new \\Doctrine\\Common\\Cache\\FileCache(sys_get_temp_dir().\'/doctrinecache\'); From 308f51722848363e83a7b56ef3a85632105e58e2 Mon Sep 17 00:00:00 2001 From: Pierre Vaidie Date: Wed, 23 Mar 2016 12:17:43 +0100 Subject: [PATCH 5/5] Update CacheInstaller.php --- src/CacheInstaller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CacheInstaller.php b/src/CacheInstaller.php index fb83dff..5ec40bc 100644 --- a/src/CacheInstaller.php +++ b/src/CacheInstaller.php @@ -30,6 +30,8 @@ public static function install(MoufManager $moufManager) { // If APC is available, let\'s use APC if (extension_loaded("apcu")) { $driver = new \\Doctrine\\Common\\Cache\\ApcuCache(); + } else if (extension_loaded("apc")) { + $driver = new \\Doctrine\\Common\\Cache\\ApcCache(); } else { $driver = new \\Doctrine\\Common\\Cache\\FileCache(sys_get_temp_dir().\'/doctrinecache\'); }