Changeset View
Changeset View
Standalone View
Standalone View
src/applications/cache/spec/PhabricatorDataCacheSpec.php
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | if (ini_get('apc.enabled')) { | ||||
$this->raiseEnableAPCIssue(); | $this->raiseEnableAPCIssue(); | ||||
} | } | ||||
} | } | ||||
private function initNoneSpec() { | private function initNoneSpec() { | ||||
if (version_compare(phpversion(), '5.5', '>=')) { | if (version_compare(phpversion(), '5.5', '>=')) { | ||||
$message = pht( | $message = pht( | ||||
'Installing the "APCu" PHP extension will improve performance. '. | 'Installing the "APCu" PHP extension will improve performance. '. | ||||
'This extension is strongly recommended. Without it, Phabricator '. | 'This extension is strongly recommended. Without it, %s '. | ||||
'must rely on a very inefficient disk-based cache.'); | 'must rely on a very inefficient disk-based cache.', | ||||
PhabricatorPlatformSite::getName()); | |||||
$this | $this | ||||
->newIssue('extension.apcu') | ->newIssue('extension.apcu') | ||||
->setShortName(pht('APCu')) | ->setShortName(pht('APCu')) | ||||
->setName(pht('PHP Extension "APCu" Not Installed')) | ->setName(pht('PHP Extension "APCu" Not Installed')) | ||||
->setMessage($message) | ->setMessage($message) | ||||
->addPHPExtension('apcu'); | ->addPHPExtension('apcu'); | ||||
} else { | } else { | ||||
$this->raiseInstallAPCIssue(); | $this->raiseInstallAPCIssue(); | ||||
} | } | ||||
} | } | ||||
private function initAPCCommonSpec() { | private function initAPCCommonSpec() { | ||||
$state = array(); | $state = array(); | ||||
if (function_exists('apcu_sma_info')) { | if (function_exists('apcu_sma_info')) { | ||||
$mem = apcu_sma_info(); | $mem = apcu_sma_info(); | ||||
$info = apcu_cache_info(); | $info = apcu_cache_info(); | ||||
Lint: PHP Compatibility: This codebase targets PHP 5.2.3, but `apcu_cache_info()` was not introduced until PHP 5.3.0. | |||||
speckAuthorUnsubmitted Done Inline ActionsAny idea what this lint is about? I'm pretty sure I ran arc lint --lintall at one point and this was not one of the things that had come up. speck: Any idea what this lint is about? I'm pretty sure I ran `arc lint --lintall` at one point and… | |||||
aviveyUnsubmitted Not Done Inline ActionsThat's a false-positive - there's an explicit check for this function 2 lines before. from arc-help, --lintall is "Show all lint warnings, not just those on changed lines"; lint --everything is "Lint all tracked files" - probably that's why it didn't show for you. avivey: That's a false-positive - there's an explicit check for this function 2 lines before.
from… | |||||
speckAuthorUnsubmitted Done Inline ActionsAh that makes sense, thanks speck: Ah that makes sense, thanks | |||||
} else if (function_exists('apc_sma_info')) { | } else if (function_exists('apc_sma_info')) { | ||||
$mem = apc_sma_info(); | $mem = apc_sma_info(); | ||||
$info = apc_cache_info('user'); | $info = apc_cache_info('user'); | ||||
} else { | } else { | ||||
$mem = null; | $mem = null; | ||||
} | } | ||||
if ($mem) { | if ($mem) { | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
This codebase targets PHP 5.2.3, but apcu_cache_info() was not introduced until PHP 5.3.0.