@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
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove the "deprecated calls in the last 30 days" setup warning

Summary: Ref T9980. I don't think this is actually useful, and plan to give users and administrators more powerful tools instead.

Test Plan: Loaded setup warnings.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9980

Differential Revision: https://secure.phabricator.com/D14778

-67
-2
src/__phutil_library_map__.php
··· 228 228 'ConduitCallTestCase' => 'applications/conduit/call/__tests__/ConduitCallTestCase.php', 229 229 'ConduitConnectConduitAPIMethod' => 'applications/conduit/method/ConduitConnectConduitAPIMethod.php', 230 230 'ConduitConnectionGarbageCollector' => 'applications/conduit/garbagecollector/ConduitConnectionGarbageCollector.php', 231 - 'ConduitDeprecatedCallSetupCheck' => 'applications/conduit/check/ConduitDeprecatedCallSetupCheck.php', 232 231 'ConduitEpochParameterType' => 'applications/conduit/parametertype/ConduitEpochParameterType.php', 233 232 'ConduitException' => 'applications/conduit/protocol/exception/ConduitException.php', 234 233 'ConduitGetCapabilitiesConduitAPIMethod' => 'applications/conduit/method/ConduitGetCapabilitiesConduitAPIMethod.php', ··· 4090 4089 'ConduitCallTestCase' => 'PhabricatorTestCase', 4091 4090 'ConduitConnectConduitAPIMethod' => 'ConduitAPIMethod', 4092 4091 'ConduitConnectionGarbageCollector' => 'PhabricatorGarbageCollector', 4093 - 'ConduitDeprecatedCallSetupCheck' => 'PhabricatorSetupCheck', 4094 4092 'ConduitEpochParameterType' => 'ConduitListParameterType', 4095 4093 'ConduitException' => 'Exception', 4096 4094 'ConduitGetCapabilitiesConduitAPIMethod' => 'ConduitAPIMethod',
-65
src/applications/conduit/check/ConduitDeprecatedCallSetupCheck.php
··· 1 - <?php 2 - 3 - final class ConduitDeprecatedCallSetupCheck extends PhabricatorSetupCheck { 4 - 5 - protected function executeChecks() { 6 - $methods = id(new PhabricatorConduitMethodQuery()) 7 - ->setViewer(PhabricatorUser::getOmnipotentUser()) 8 - ->withIsDeprecated(true) 9 - ->execute(); 10 - if (!$methods) { 11 - return; 12 - } 13 - 14 - $methods = mpull($methods, null, 'getAPIMethodName'); 15 - $method_names = mpull($methods, 'getAPIMethodName'); 16 - 17 - $table = new PhabricatorConduitMethodCallLog(); 18 - $conn_r = $table->establishConnection('r'); 19 - 20 - $calls = queryfx_all( 21 - $conn_r, 22 - 'SELECT DISTINCT method FROM %T WHERE dateCreated > %d 23 - AND method IN (%Ls)', 24 - $table->getTableName(), 25 - time() - (60 * 60 * 24 * 30), 26 - $method_names); 27 - $calls = ipull($calls, 'method', 'method'); 28 - 29 - foreach ($calls as $method_name) { 30 - $method = $methods[$method_name]; 31 - 32 - $summary = pht( 33 - 'Deprecated Conduit method `%s` was called in the last 30 days. '. 34 - 'You should migrate away from use of this method: it will be '. 35 - 'removed in a future version of Phabricator.', 36 - $method_name); 37 - 38 - $uri = PhabricatorEnv::getURI('/conduit/log/?methods='.$method_name); 39 - 40 - $description = $method->getMethodStatusDescription(); 41 - 42 - $message = pht( 43 - 'Deprecated Conduit method %s was called in the last 30 days. '. 44 - 'You should migrate away from use of this method: it will be '. 45 - 'removed in a future version of Phabricator.'. 46 - "\n\n". 47 - "%s: %s". 48 - "\n\n". 49 - 'If you have already migrated all callers away from this method, '. 50 - 'you can safely ignore this setup issue.', 51 - phutil_tag('tt', array(), $method_name), 52 - phutil_tag('tt', array(), $method_name), 53 - $description); 54 - 55 - $this 56 - ->newIssue('conduit.deprecated.'.$method_name) 57 - ->setShortName(pht('Deprecated Conduit Method')) 58 - ->setName(pht('Deprecated Conduit Method "%s" In Use', $method_name)) 59 - ->setSummary($summary) 60 - ->setMessage($message) 61 - ->addLink($uri, pht('View Method Call Logs')); 62 - } 63 - } 64 - 65 - }