Make all bin/* scripts locate their workflows dynamically
Summary: Ref T2015. Not directly related to Drydock, but I bumped into this. All these scripts currently enumerate their workflows explicitly. Instead, use `PhutilSymbolLoader` to automatically discover workflows. This reduces code duplication and errors (see all the bad `extends` this diff fixes) and lets third parties add new workflows (not clearly valuable?). Test Plan: Ran `bin/x help` for each modified script. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2015 Differential Revision: https://secure.phabricator.com/D7840
This commit is contained in:
@@ -99,14 +99,9 @@ try {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$workflows = array(
|
||||
new PhabricatorStorageManagementDatabasesWorkflow(),
|
||||
new PhabricatorStorageManagementDestroyWorkflow(),
|
||||
new PhabricatorStorageManagementDumpWorkflow(),
|
||||
new PhabricatorStorageManagementStatusWorkflow(),
|
||||
new PhabricatorStorageManagementProbeWorkflow(),
|
||||
new PhabricatorStorageManagementUpgradeWorkflow(),
|
||||
);
|
||||
$workflows = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass('PhabricatorStorageManagementWorkflow')
|
||||
->loadObjects();
|
||||
|
||||
$patches = PhabricatorSQLPatchList::buildAllPatches();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user