Page MenuHomePhabricator

Standardize naming conventions
Open, LowPublic

Description

There are various inconsistencies in class naming conventions that we should probably fix eventually. Many of these are trivial and shouldn't break anything. Some are more involved and will involve migrations.

  • Sometimes, abstract base classes are explicitly labelled as such by the presence of Base in the class name. For example, ArcanistBaseWorkflow versus ArcanistLinter (which are both abstract classes). I prefer the latter.
  • PhabricatorApplicationSettings is probably clearer as PhabricatorSettingsApplication. There are many classes that follow the former naming convention (some discussion in D9839).
  • Conduit API classes are quite hideous and have underscores in them.
  • Some class names are prefixed with Phabricator, whilst others are not (for example, DifferentialDiff versus PhabricatorPaste) ----

Original description
I am curious as to why the classes which represent Conduit methods (such as ConduitAPI_flag_delete_Method) have a naming convention that is inconsistent with the rest of the codebase. I was hoping you could clarify the reasoning here.

Would it not be cleaner to have something like:

<?php

final class ConduitAPIFlagDeleteMethod extends ConduitAPIFlagMethod {

  public function getConduitMethod() {
    return 'flag.delete';
  }

}

Revisions and Commits

rPHU libphutil
D12568
D11675
D11226
D11228
D11188
D10148
D10159
D10158
D10155
D10149
D9993
D10008
D9998
D9995
rARC Arcanist
Abandoned
Abandoned
D10004
D11740
D11673
D11670
D11712
D11713
D11203
D11201
D11200
D10011
D9983
rP Phabricator
Abandoned
Closed
Abandoned
D13266
D13165
D12563
D12669
D11470
D11191
D11227
D11189
D11186
D11187
D11185
D11182
D11177
D11178
D11166
D11148
D11130
AuditedD11131
D11136
D10156
D10150
D9994
D10049
Audited
D9991
D10037
D9986
D9982
D10009
D9999
D9984
D9989
D9988

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
aik099 removed a subscriber: aik099.Jan 4 2015, 7:59 PM