@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

Conduit: Convert some Frozen methods to Deprecated methods

Summary:
* Move some Conduit API methods from `METHOD_STATUS_FROZEN` to `METHOD_STATUS_DEPRECATED` as their modern replacements provide the same query parameter features. See rPaa6e788f for historical context.
* Also synchronize the "Stability" messages of other already deprecated methods, so translators have a little bit less work.
* Also print the date of method deprecation in `getMethodStatusDescription()` which will make judgement easier in the future whether to remove a deprecated method.
Closes T16258

Test Plan:
* Go to http://phorge.localhost/conduit/query/all/, see 19 instead of 25 Frozen methods.
* Go to http://phorge.localhost/conduit/query/all/, see more Deprecated methods.
* Open the web page of some deprecated methods, look at the "Stability" description.
* Probably create an API call with one of the newly deprecated methods and see the call listed on http://phorge.localhost/conduit/log/query/deprecated/ but I did not test that

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16258

Differential Revision: https://we.phorge.it/D26326

+68 -32
+4 -3
src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
··· 12 12 } 13 13 14 14 public function getMethodStatus() { 15 - return self::METHOD_STATUS_FROZEN; 15 + return self::METHOD_STATUS_DEPRECATED; 16 16 } 17 17 18 18 public function getMethodStatusDescription() { 19 19 return pht( 20 - 'This method is frozen and will eventually be deprecated. New code '. 21 - 'should use "conpherence.edit" instead.'); 20 + 'This method has been deprecated since %s in favor of %s.', 21 + '10/2025', 22 + 'conpherence.edit'); 22 23 } 23 24 24 25 protected function defineParamTypes() {
+4 -3
src/applications/differential/conduit/DifferentialCloseConduitAPIMethod.php
··· 12 12 } 13 13 14 14 public function getMethodStatus() { 15 - return self::METHOD_STATUS_FROZEN; 15 + return self::METHOD_STATUS_DEPRECATED; 16 16 } 17 17 18 18 public function getMethodStatusDescription() { 19 19 return pht( 20 - 'This method is frozen and will eventually be deprecated. New code '. 21 - 'should use "differential.revision.edit" instead.'); 20 + 'This method has been deprecated since %s in favor of %s.', 21 + '10/2025', 22 + 'differential.revision.edit'); 22 23 } 23 24 24 25 protected function defineParamTypes() {
+4 -3
src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php
··· 12 12 } 13 13 14 14 public function getMethodStatus() { 15 - return self::METHOD_STATUS_FROZEN; 15 + return self::METHOD_STATUS_DEPRECATED; 16 16 } 17 17 18 18 public function getMethodStatusDescription() { 19 19 return pht( 20 - 'This method is frozen and will eventually be deprecated. New code '. 21 - 'should use "differential.revision.edit" instead.'); 20 + 'This method has been deprecated since %s in favor of %s.', 21 + '10/2025', 22 + 'differential.revision.edit'); 22 23 } 23 24 24 25 protected function defineParamTypes() {
+2 -1
src/applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php
··· 13 13 14 14 public function getMethodStatusDescription() { 15 15 return pht( 16 - 'This method has been deprecated in favor of %s.', 16 + 'This method has been deprecated since %s in favor of %s.', 17 + '09/2013', 17 18 'differential.querydiffs'); 18 19 } 19 20
+2 -1
src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
··· 17 17 18 18 public function getMethodStatusDescription() { 19 19 return pht( 20 - 'This method has been deprecated in favor of %s.', 20 + 'This method has been deprecated since %s in favor of %s.', 21 + '09/2013', 21 22 'differential.querydiffs'); 22 23 } 23 24
+1 -1
src/applications/differential/conduit/DifferentialGetRevisionCommentsConduitAPIMethod.php
··· 12 12 } 13 13 14 14 public function getMethodStatusDescription() { 15 - return pht('Obsolete and doomed, see T2222.'); 15 + return pht('Obsolete and doomed since 02/2014, see T2222.'); 16 16 } 17 17 18 18 public function getMethodDescription() {
+4 -1
src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
··· 12 12 } 13 13 14 14 public function getMethodStatusDescription() { 15 - return pht("Replaced by '%s'.", 'differential.query'); 15 + return pht( 16 + 'This method has been deprecated since %s in favor of %s.', 17 + '04/2012', 18 + 'differential.query'); 16 19 } 17 20 18 21 public function getMethodDescription() {
+4 -1
src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php
··· 14 14 } 15 15 16 16 public function getMethodStatusDescription() { 17 - return pht('Obsoleted by "diffusion.historyquery".'); 17 + return pht( 18 + 'This method has been deprecated since %s in favor of %s.', 19 + '08/2018', 20 + 'diffusion.historyquery'); 18 21 } 19 22 20 23 public function getMethodDescription() {
+4 -3
src/applications/files/conduit/FileInfoConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatus() { 14 - return self::METHOD_STATUS_FROZEN; 14 + return self::METHOD_STATUS_DEPRECATED; 15 15 } 16 16 17 17 public function getMethodStatusDescription() { 18 18 return pht( 19 - 'This method is frozen and will eventually be deprecated. New code '. 20 - 'should use "file.search" instead.'); 19 + 'This method has been deprecated since %s in favor of %s.', 20 + '10/2025', 21 + 'file.search'); 21 22 } 22 23 23 24 protected function defineParamTypes() {
+3 -2
src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
··· 12 12 13 13 public function getMethodStatusDescription() { 14 14 return pht( 15 - 'This method is deprecated. Callers should use "file.allocate" '. 16 - 'instead.'); 15 + 'This method has been deprecated since %s in favor of %s.', 16 + '04/2017', 17 + 'file.allocate'); 17 18 } 18 19 19 20 public function getMethodDescription() {
+4 -1
src/applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php
··· 16 16 } 17 17 18 18 public function getMethodStatusDescription() { 19 - return pht('Use %s instead.', 'harbormaster.build.search'); 19 + return pht( 20 + 'This method has been deprecated since %s in favor of %s.', 21 + '07/2016', 22 + 'harbormaster.build.search'); 20 23 } 21 24 22 25 protected function defineParamTypes() {
+4 -3
src/applications/paste/conduit/PasteCreateConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatus() { 14 - return self::METHOD_STATUS_FROZEN; 14 + return self::METHOD_STATUS_DEPRECATED; 15 15 } 16 16 17 17 public function getMethodStatusDescription() { 18 18 return pht( 19 - 'This method is frozen and will eventually be deprecated. New code '. 20 - 'should use "paste.edit" instead.'); 19 + 'This method has been deprecated since %s in favor of %s.', 20 + '10/2025', 21 + 'paste.edit'); 21 22 } 22 23 23 24 protected function defineParamTypes() {
+4 -1
src/applications/paste/conduit/PasteInfoConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatusDescription() { 14 - return pht("Replaced by '%s'.", 'paste.query'); 14 + return pht( 15 + 'This method has been deprecated since %s in favor of %s.', 16 + '08/2012', 17 + 'paste.query'); 15 18 } 16 19 17 20 public function getMethodDescription() {
+4 -3
src/applications/paste/conduit/PasteQueryConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatus() { 14 - return self::METHOD_STATUS_FROZEN; 14 + return self::METHOD_STATUS_DEPRECATED; 15 15 } 16 16 17 17 public function getMethodStatusDescription() { 18 18 return pht( 19 - 'This method is frozen and will eventually be deprecated. New code '. 20 - 'should use "paste.search" instead.'); 19 + 'This method has been deprecated since %s in favor of %s.', 20 + '10/2025', 21 + 'paste.search'); 21 22 } 22 23 23 24 protected function defineParamTypes() {
+4 -1
src/applications/people/conduit/UserDisableConduitAPIMethod.php
··· 15 15 } 16 16 17 17 public function getMethodStatusDescription() { 18 - return pht('Obsoleted by method "user.edit".'); 18 + return pht( 19 + 'This method has been deprecated since %s in favor of %s.', 20 + '08/2018', 21 + 'user.edit'); 19 22 } 20 23 21 24 protected function defineParamTypes() {
+4 -1
src/applications/people/conduit/UserEnableConduitAPIMethod.php
··· 15 15 } 16 16 17 17 public function getMethodStatusDescription() { 18 - return pht('Obsoleted by method "user.edit".'); 18 + return pht( 19 + 'This method has been deprecated since %s in favor of %s.', 20 + '08/2018', 21 + 'user.edit'); 19 22 } 20 23 21 24 protected function defineParamTypes() {
+4 -1
src/applications/people/conduit/UserFindConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatusDescription() { 14 - return pht('Obsoleted by "%s".', 'user.query'); 14 + return pht( 15 + 'This method has been deprecated since %s in favor of %s.', 16 + '01/2014', 17 + 'user.query'); 15 18 } 16 19 17 20 public function getMethodDescription() {
+4 -1
src/applications/phid/conduit/PHIDInfoConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatusDescription() { 14 - return pht("Replaced by 'phid.query'."); 14 + return pht( 15 + 'This method has been deprecated since %s in favor of %s.', 16 + '04/2012', 17 + 'phid.query'); 15 18 } 16 19 17 20 public function getMethodDescription() {
+4 -1
src/applications/slowvote/conduit/SlowvoteInfoConduitAPIMethod.php
··· 11 11 } 12 12 13 13 public function getMethodStatusDescription() { 14 - return pht('Replaced by "slowvote.poll.search".'); 14 + return pht( 15 + 'This method has been deprecated since %s in favor of %s.', 16 + '07/2019', 17 + 'slowvote.poll.search'); 15 18 } 16 19 17 20 public function getMethodDescription() {