@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3abstract class PhabricatorSearchManagementWorkflow
4 extends PhabricatorManagementWorkflow {
5
6 protected function validateClusterSearchConfig() {
7 // Configuration is normally validated by setup self-checks on the web
8 // workflow, but users may reasonably run `bin/search` commands after
9 // making manual edits to "local.json". Re-verify configuration here before
10 // continuing.
11
12 $config_key = 'cluster.search';
13 $config_value = PhabricatorEnv::getEnvConfig($config_key);
14
15 try {
16 PhabricatorClusterSearchConfigType::validateValue($config_value);
17 } catch (Exception $ex) {
18 throw new PhutilArgumentUsageException(
19 pht(
20 'Setting "%s" is misconfigured: %s',
21 $config_key,
22 $ex->getMessage()));
23 }
24 }
25
26}