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

Formally deprecate owners.query Conduit API method

Summary: This is completely obsoleted by `owners.search`. See D15472.

Test Plan: Viewed API method in UI console.

Reviewers: avivey, chad

Reviewed By: chad

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

+53 -24
+35 -17
src/applications/conduit/controller/PhabricatorConduitConsoleController.php
··· 23 23 24 24 $call_uri = '/api/'.$method->getAPIMethodName(); 25 25 26 - $status = $method->getMethodStatus(); 27 - $reason = $method->getMethodStatusDescription(); 28 26 $errors = array(); 29 - 30 - switch ($status) { 31 - case ConduitAPIMethod::METHOD_STATUS_DEPRECATED: 32 - $reason = nonempty($reason, pht('This method is deprecated.')); 33 - $errors[] = pht('Deprecated Method: %s', $reason); 34 - break; 35 - case ConduitAPIMethod::METHOD_STATUS_UNSTABLE: 36 - $reason = nonempty( 37 - $reason, 38 - pht( 39 - 'This method is new and unstable. Its interface is subject '. 40 - 'to change.')); 41 - $errors[] = pht('Unstable Method: %s', $reason); 42 - break; 43 - } 44 27 45 28 $form = id(new AphrontFormView()) 46 29 ->setAction($call_uri) ··· 126 109 $viewer = $this->getViewer(); 127 110 128 111 $view = id(new PHUIPropertyListView()); 112 + 113 + $status = $method->getMethodStatus(); 114 + $reason = $method->getMethodStatusDescription(); 115 + 116 + switch ($status) { 117 + case ConduitAPIMethod::METHOD_STATUS_UNSTABLE: 118 + $stability_icon = 'fa-exclamation-triangle yellow'; 119 + $stability_label = pht('Unstable Method'); 120 + $stability_info = nonempty( 121 + $reason, 122 + pht( 123 + 'This method is new and unstable. Its interface is subject '. 124 + 'to change.')); 125 + break; 126 + case ConduitAPIMethod::METHOD_STATUS_DEPRECATED: 127 + $stability_icon = 'fa-exclamation-triangle red'; 128 + $stability_label = pht('Deprecated Method'); 129 + $stability_info = nonempty($reason, pht('This method is deprecated.')); 130 + break; 131 + default: 132 + $stability_label = null; 133 + break; 134 + } 135 + 136 + if ($stability_label) { 137 + $view->addProperty( 138 + pht('Stability'), 139 + array( 140 + id(new PHUIIconView())->setIcon($stability_icon), 141 + ' ', 142 + phutil_tag('strong', array(), $stability_label.':'), 143 + ' ', 144 + $stability_info, 145 + )); 146 + } 129 147 130 148 $view->addProperty( 131 149 pht('Returns'),
+10 -5
src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php
··· 6 6 return 'owners.query'; 7 7 } 8 8 9 + public function getMethodStatus() { 10 + return self::METHOD_STATUS_DEPRECATED; 11 + } 12 + 13 + public function getMethodStatusDescription() { 14 + return pht('Obsolete; use "owners.search" instead.'); 15 + } 16 + 17 + 9 18 public function getMethodDescription() { 10 - return pht( 11 - 'Query for packages by one of the following: repository/path, '. 12 - 'packages with a given user or project owner, or packages affiliated '. 13 - 'with a user (owned by either the user or a project they are a member '. 14 - 'of.) You should only provide at most one search query.'); 19 + return pht('Query for Owners packages. Obsoleted by "owners.search".'); 15 20 } 16 21 17 22 protected function defineParamTypes() {
+4 -1
src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php
··· 37 37 } 38 38 39 39 public function getMethodStatusDescription() { 40 - return pht('ApplicationSearch methods are highly unstable.'); 40 + return pht( 41 + 'ApplicationSearch methods are fairly stable, but were introduced '. 42 + 'relatively recently and may continue to evolve as more applications '. 43 + 'adopt them.'); 41 44 } 42 45 43 46 final protected function defineParamTypes() {
+4 -1
src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php
··· 16 16 } 17 17 18 18 public function getMethodStatusDescription() { 19 - return pht('ApplicationEditor methods are highly unstable.'); 19 + return pht( 20 + 'ApplicationEditor methods are fairly stable, but were introduced '. 21 + 'relativelyr cently and may continue to evolve as more applications '. 22 + 'adopt them.'); 20 23 } 21 24 22 25 final protected function defineParamTypes() {