mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 17:52:43 +01:00
30 lines
905 B
PHP
30 lines
905 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorSetupCheckInvalidConfig extends PhabricatorSetupCheck {
|
||
|
|
||
|
protected function executeChecks() {
|
||
|
$groups = PhabricatorApplicationConfigOptions::loadAll();
|
||
|
foreach ($groups as $group) {
|
||
|
$options = $group->getOptions();
|
||
|
foreach ($options as $option) {
|
||
|
try {
|
||
|
$group->validateOption(
|
||
|
$option,
|
||
|
PhabricatorEnv::getEnvConfig($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: %s",
|
||
|
$option->getKey(),
|
||
|
$ex->getMessage()))
|
||
|
->addPhabricatorConfig($option->getKey());
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|