mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 09:42:41 +01:00
b701313e0e
Summary: Groups setup issues into Important, PHP, MySQL, and Base for easier parsing on initial installations. Test Plan: Test my internal server and various issues. {F289699} Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7207 Differential Revision: https://secure.phabricator.com/D11726
34 lines
1 KiB
PHP
34 lines
1 KiB
PHP
<?php
|
|
|
|
final class PhabricatorInvalidConfigSetupCheck extends PhabricatorSetupCheck {
|
|
|
|
public function getDefaultGroup() {
|
|
return self::GROUP_OTHER;
|
|
}
|
|
|
|
protected function executeChecks() {
|
|
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
|
foreach ($groups as $group) {
|
|
$options = $group->getOptions();
|
|
foreach ($options as $option) {
|
|
try {
|
|
$group->validateOption(
|
|
$option,
|
|
PhabricatorEnv::getUnrepairedEnvConfig($option->getKey()));
|
|
} catch (PhabricatorConfigValidationException $ex) {
|
|
$this
|
|
->newIssue('config.invalid.'.$option->getKey())
|
|
->setName(pht("Config '%s' Invalid", $option->getKey()))
|
|
->setMessage(
|
|
pht(
|
|
"Configuration option '%s' has invalid value and ".
|
|
"was restored to the default: %s",
|
|
$option->getKey(),
|
|
$ex->getMessage()))
|
|
->addPhabricatorConfig($option->getKey());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|