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
This commit is contained in:
epriestley
2015-04-08 11:31:01 -07:00
parent bc08901afa
commit ffe9c26b00
9 changed files with 237 additions and 216 deletions

View File

@@ -40,7 +40,6 @@ final class PhabricatorConfigCacheController
$this->renderCommonProperties($properties, $cache);
return id(new PHUIObjectBoxView())
->setFormErrors($this->renderIssues($cache->getIssues()))
->setHeaderText(pht('Opcode Cache'))
->addPropertyList($properties);
}
@@ -146,20 +145,6 @@ final class PhabricatorConfigCacheController
}
private function renderIssues(array $issues) {
$result = array();
foreach ($issues as $issue) {
$title = $issue['title'];
$body = $issue['body'];
$result[] = array(
phutil_tag('strong', array(), $title.':'),
' ',
$body,
);
}
return $result;
}
private function renderYes($info) {
return array(
id(new PHUIIconView())->setIconFont('fa-check', 'green'),