Files
phabricator/src/applications/config/check/PhabricatorCacheSetupCheck.php
epriestley ffe9c26b00 Emit cache setup issues from cache specs
Summary:
Ref T5501. Currently, we emit some bad warnings about, e.g., "apc.stat" on PHP 5.5+ systems with OPcache, where the warnings are not relevant.

Generate and raise warnings out of the CacheSpec pipeline so we only run relevant code.

Test Plan: Faked various warnings and saw them render correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T5501

Differential Revision: https://secure.phabricator.com/D12318
2015-04-08 11:31:01 -07:00

21 lines
472 B
PHP

<?php
final class PhabricatorCacheSetupCheck extends PhabricatorSetupCheck {
public function getDefaultGroup() {
return self::GROUP_OTHER;
}
protected function executeChecks() {
$code_cache = PhabricatorOpcodeCacheSpec::getActiveCacheSpec();
$data_cache = PhabricatorDataCacheSpec::getActiveCacheSpec();
$issues = $code_cache->getIssues() + $data_cache->getIssues();
foreach ($issues as $issue) {
$this->addIssue($issue);
}
}
}