From 1dd087dbf10fb7b1b67a5932a395039fee4c17ed Mon Sep 17 00:00:00 2001 From: andreybolonin Date: Fri, 25 Sep 2015 14:54:10 +0300 Subject: [PATCH] OPcache checking less php 5.5 --- requirements.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/requirements.php b/requirements.php index ee6b2cb..ee3184f 100644 --- a/requirements.php +++ b/requirements.php @@ -85,12 +85,6 @@ $requirements = array( 'by' => 'MemCache', 'memo' => extension_loaded('memcached') ? 'To use memcached set MemCache::useMemcached to true.' : '' ), - array( - 'name' => 'APC extension', - 'mandatory' => false, - 'condition' => extension_loaded('apc'), - 'by' => 'ApcCache', - ), // CAPTCHA: array( 'name' => 'GD PHP extension with FreeType support', @@ -124,9 +118,20 @@ $requirements = array( 'phpSmtp' => array( 'name' => 'PHP mail SMTP', 'mandatory' => false, - 'condition' => strlen(ini_get('SMTP'))>0, + 'condition' => strlen(ini_get('SMTP')) > 0, 'by' => 'Email sending', 'memo' => 'PHP mail SMTP server required', ), ); + +// OPcache check +if (!version_compare(phpversion(), '5.5', '>=')) { + $requirements[] = array( + 'name' => 'APC extension', + 'mandatory' => false, + 'condition' => extension_loaded('apc'), + 'by' => 'ApcCache', + ); +} + $requirementsChecker->checkYii()->check($requirements)->render();