diff --git a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php index 5ee76b44f7..b767ead4f0 100644 --- a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php +++ b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php @@ -23,25 +23,8 @@ final class PhabricatorConduitConsoleController $call_uri = '/api/'.$method->getAPIMethodName(); - $status = $method->getMethodStatus(); - $reason = $method->getMethodStatusDescription(); $errors = array(); - switch ($status) { - case ConduitAPIMethod::METHOD_STATUS_DEPRECATED: - $reason = nonempty($reason, pht('This method is deprecated.')); - $errors[] = pht('Deprecated Method: %s', $reason); - break; - case ConduitAPIMethod::METHOD_STATUS_UNSTABLE: - $reason = nonempty( - $reason, - pht( - 'This method is new and unstable. Its interface is subject '. - 'to change.')); - $errors[] = pht('Unstable Method: %s', $reason); - break; - } - $form = id(new AphrontFormView()) ->setAction($call_uri) ->setUser($request->getUser()) @@ -127,6 +110,41 @@ final class PhabricatorConduitConsoleController $view = id(new PHUIPropertyListView()); + $status = $method->getMethodStatus(); + $reason = $method->getMethodStatusDescription(); + + switch ($status) { + case ConduitAPIMethod::METHOD_STATUS_UNSTABLE: + $stability_icon = 'fa-exclamation-triangle yellow'; + $stability_label = pht('Unstable Method'); + $stability_info = nonempty( + $reason, + pht( + 'This method is new and unstable. Its interface is subject '. + 'to change.')); + break; + case ConduitAPIMethod::METHOD_STATUS_DEPRECATED: + $stability_icon = 'fa-exclamation-triangle red'; + $stability_label = pht('Deprecated Method'); + $stability_info = nonempty($reason, pht('This method is deprecated.')); + break; + default: + $stability_label = null; + break; + } + + if ($stability_label) { + $view->addProperty( + pht('Stability'), + array( + id(new PHUIIconView())->setIcon($stability_icon), + ' ', + phutil_tag('strong', array(), $stability_label.':'), + ' ', + $stability_info, + )); + } + $view->addProperty( pht('Returns'), $method->getReturnType()); diff --git a/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php b/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php index a3b7b52cab..c79f612545 100644 --- a/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php +++ b/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php @@ -6,12 +6,17 @@ final class OwnersQueryConduitAPIMethod extends OwnersConduitAPIMethod { return 'owners.query'; } + public function getMethodStatus() { + return self::METHOD_STATUS_DEPRECATED; + } + + public function getMethodStatusDescription() { + return pht('Obsolete; use "owners.search" instead.'); + } + + public function getMethodDescription() { - return pht( - 'Query for packages by one of the following: repository/path, '. - 'packages with a given user or project owner, or packages affiliated '. - 'with a user (owned by either the user or a project they are a member '. - 'of.) You should only provide at most one search query.'); + return pht('Query for Owners packages. Obsoleted by "owners.search".'); } protected function defineParamTypes() { diff --git a/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php b/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php index b5cd52471b..d1e8e5f3f8 100644 --- a/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php +++ b/src/applications/search/engine/PhabricatorSearchEngineAPIMethod.php @@ -37,7 +37,10 @@ abstract class PhabricatorSearchEngineAPIMethod } public function getMethodStatusDescription() { - return pht('ApplicationSearch methods are highly unstable.'); + return pht( + 'ApplicationSearch methods are fairly stable, but were introduced '. + 'relatively recently and may continue to evolve as more applications '. + 'adopt them.'); } final protected function defineParamTypes() { diff --git a/src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php b/src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php index b6f95ecd1b..e478de1e20 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngineAPIMethod.php @@ -16,7 +16,10 @@ abstract class PhabricatorEditEngineAPIMethod } public function getMethodStatusDescription() { - return pht('ApplicationEditor methods are highly unstable.'); + return pht( + 'ApplicationEditor methods are fairly stable, but were introduced '. + 'relativelyr cently and may continue to evolve as more applications '. + 'adopt them.'); } final protected function defineParamTypes() {