diff --git a/scripts/diviner/diviner.php b/scripts/diviner/diviner.php index 9d866ad0b3..fe9c4e1ded 100755 --- a/scripts/diviner/diviner.php +++ b/scripts/diviner/diviner.php @@ -14,9 +14,8 @@ EOHELP ); $args->parseStandardArguments(); -$args->parseWorkflows( - array( - new DivinerGenerateWorkflow(), - new DivinerAtomizeWorkflow(), - new PhutilHelpArgumentWorkflow(), - )); +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('DivinerWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); +$args->parseWorkflows($workflows); diff --git a/scripts/drydock/drydock_control.php b/scripts/drydock/drydock_control.php index 6bd40731fd..0a01b91fa3 100755 --- a/scripts/drydock/drydock_control.php +++ b/scripts/drydock/drydock_control.php @@ -14,12 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new DrydockManagementLeaseWorkflow(), - new DrydockManagementCloseWorkflow(), - new DrydockManagementReleaseWorkflow(), - new DrydockManagementCreateResourceWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('DrydockManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/fact/manage_facts.php b/scripts/fact/manage_facts.php index 13e3598651..973e5bfa21 100755 --- a/scripts/fact/manage_facts.php +++ b/scripts/fact/manage_facts.php @@ -15,13 +15,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorFactManagementDestroyWorkflow(), - new PhabricatorFactManagementAnalyzeWorkflow(), - new PhabricatorFactManagementStatusWorkflow(), - new PhabricatorFactManagementListWorkflow(), - new PhabricatorFactManagementCursorsWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorFactManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/files/manage_files.php b/scripts/files/manage_files.php index c1f276999c..661d65ea3f 100755 --- a/scripts/files/manage_files.php +++ b/scripts/files/manage_files.php @@ -14,12 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorFilesManagementEnginesWorkflow(), - new PhabricatorFilesManagementMigrateWorkflow(), - new PhabricatorFilesManagementRebuildWorkflow(), - new PhabricatorFilesManagementPurgeWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorFilesManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/lipsum/manage_lipsum.php b/scripts/lipsum/manage_lipsum.php index e7092f8797..3a7c0a23a8 100755 --- a/scripts/lipsum/manage_lipsum.php +++ b/scripts/lipsum/manage_lipsum.php @@ -14,9 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorLipsumGenerateWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorLipsumManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/mail/manage_mail.php b/scripts/mail/manage_mail.php index 66ecaea18e..fefb1e0da3 100755 --- a/scripts/mail/manage_mail.php +++ b/scripts/mail/manage_mail.php @@ -14,15 +14,9 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhutilHelpArgumentWorkflow(), - new PhabricatorMailManagementResendWorkflow(), - new PhabricatorMailManagementShowOutboundWorkflow(), - new PhabricatorMailManagementShowInboundWorkflow(), - new PhabricatorMailManagementSendTestWorkflow(), - new PhabricatorMailManagementReceiveTestWorkflow(), - new PhabricatorMailManagementListInboundWorkflow(), - new PhabricatorMailManagementListOutboundWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorMailManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); + diff --git a/scripts/repository/manage_repositories.php b/scripts/repository/manage_repositories.php index 0236a7d640..b3ebac0842 100755 --- a/scripts/repository/manage_repositories.php +++ b/scripts/repository/manage_repositories.php @@ -15,16 +15,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorRepositoryManagementPullWorkflow(), - new PhabricatorRepositoryManagementDiscoverWorkflow(), - new PhabricatorRepositoryManagementEditWorkflow(), - new PhabricatorRepositoryManagementListWorkflow(), - new PhabricatorRepositoryManagementDeleteWorkflow(), - new PhabricatorRepositoryManagementMarkImportedWorkflow(), - new PhabricatorRepositoryManagementLookupUsersWorkflow(), - new PhabricatorRepositoryManagementImportingWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorRepositoryManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/search/manage_search.php b/scripts/search/manage_search.php index 25c391b6c3..b07ff54bad 100755 --- a/scripts/search/manage_search.php +++ b/scripts/search/manage_search.php @@ -14,9 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorSearchManagementIndexWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorSearchManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/setup/manage_audit.php b/scripts/setup/manage_audit.php index 8502db2674..9a085c6947 100755 --- a/scripts/setup/manage_audit.php +++ b/scripts/setup/manage_audit.php @@ -14,9 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorAuditManagementDeleteWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorAuditManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/setup/manage_auth.php b/scripts/setup/manage_auth.php index f4c87e95d8..a674c92b01 100755 --- a/scripts/setup/manage_auth.php +++ b/scripts/setup/manage_auth.php @@ -14,11 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorAuthManagementRecoverWorkflow(), - new PhabricatorAuthManagementRefreshWorkflow(), - new PhabricatorAuthManagementLDAPWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorAuthManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/setup/manage_config.php b/scripts/setup/manage_config.php index 1610ebd257..5c07e7293f 100755 --- a/scripts/setup/manage_config.php +++ b/scripts/setup/manage_config.php @@ -14,12 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorConfigManagementListWorkflow(), - new PhabricatorConfigManagementSetWorkflow(), - new PhabricatorConfigManagementGetWorkflow(), - new PhabricatorConfigManagementDeleteWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorConfigManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/setup/manage_feed.php b/scripts/setup/manage_feed.php index 46547f4dc0..81d2cb502b 100755 --- a/scripts/setup/manage_feed.php +++ b/scripts/setup/manage_feed.php @@ -14,9 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorFeedManagementRepublishWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorFeedManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/setup/manage_harbormaster.php b/scripts/setup/manage_harbormaster.php index a7c84812f9..1903bdd907 100755 --- a/scripts/setup/manage_harbormaster.php +++ b/scripts/setup/manage_harbormaster.php @@ -18,5 +18,4 @@ $workflows = id(new PhutilSymbolLoader()) ->setAncestorClass('HarbormasterManagementWorkflow') ->loadObjects(); $workflows[] = new PhutilHelpArgumentWorkflow(); - $args->parseWorkflows($workflows); diff --git a/scripts/setup/manage_policy.php b/scripts/setup/manage_policy.php index bb80f0876b..a9ab27731a 100755 --- a/scripts/setup/manage_policy.php +++ b/scripts/setup/manage_policy.php @@ -14,10 +14,8 @@ EOSYNOPSIS ); $args->parseStandardArguments(); -$workflows = array( - new PhabricatorPolicyManagementShowWorkflow(), - new PhabricatorPolicyManagementUnlockWorkflow(), - new PhutilHelpArgumentWorkflow(), -); - +$workflows = id(new PhutilSymbolLoader()) + ->setAncestorClass('PhabricatorPolicyManagementWorkflow') + ->loadObjects(); +$workflows[] = new PhutilHelpArgumentWorkflow(); $args->parseWorkflows($workflows); diff --git a/scripts/sql/manage_storage.php b/scripts/sql/manage_storage.php index 14ec913623..a94ee75f3c 100755 --- a/scripts/sql/manage_storage.php +++ b/scripts/sql/manage_storage.php @@ -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(); diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 7cda5a1c7e..9d34da6aa0 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -3740,7 +3740,7 @@ phutil_register_library_map(array( 'PhabricatorBuiltinPatchList' => 'PhabricatorSQLPatchList', 'PhabricatorBusyExample' => 'PhabricatorUIExample', 'PhabricatorCacheDAO' => 'PhabricatorLiskDAO', - 'PhabricatorCacheManagementPurgeWorkflow' => 'PhabricatorSearchManagementWorkflow', + 'PhabricatorCacheManagementPurgeWorkflow' => 'PhabricatorCacheManagementWorkflow', 'PhabricatorCacheManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorCalendarBrowseController' => 'PhabricatorCalendarController', 'PhabricatorCalendarController' => 'PhabricatorController', @@ -4113,13 +4113,13 @@ phutil_register_library_map(array( 'PhabricatorMailImplementationPHPMailerLiteAdapter' => 'PhabricatorMailImplementationAdapter', 'PhabricatorMailImplementationSendGridAdapter' => 'PhabricatorMailImplementationAdapter', 'PhabricatorMailImplementationTestAdapter' => 'PhabricatorMailImplementationAdapter', - 'PhabricatorMailManagementListInboundWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementListOutboundWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementReceiveTestWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementResendWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementSendTestWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementShowInboundWorkflow' => 'PhabricatorSearchManagementWorkflow', - 'PhabricatorMailManagementShowOutboundWorkflow' => 'PhabricatorSearchManagementWorkflow', + 'PhabricatorMailManagementListInboundWorkflow' => 'PhabricatorMailManagementWorkflow', + 'PhabricatorMailManagementListOutboundWorkflow' => 'PhabricatorMailManagementWorkflow', + 'PhabricatorMailManagementReceiveTestWorkflow' => 'PhabricatorMailManagementWorkflow', + 'PhabricatorMailManagementResendWorkflow' => 'PhabricatorMailManagementWorkflow', + 'PhabricatorMailManagementSendTestWorkflow' => 'PhabricatorMailManagementWorkflow', + 'PhabricatorMailManagementShowInboundWorkflow' => 'PhabricatorMailManagementWorkflow', + 'PhabricatorMailManagementShowOutboundWorkflow' => 'PhabricatorMailManagementWorkflow', 'PhabricatorMailManagementWorkflow' => 'PhabricatorManagementWorkflow', 'PhabricatorMailReceiverTestCase' => 'PhabricatorTestCase', 'PhabricatorMailingListPHIDTypeList' => 'PhabricatorPHIDType', diff --git a/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php b/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php index cfa29c0b5e..709c66ba6b 100644 --- a/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php +++ b/src/applications/cache/management/PhabricatorCacheManagementPurgeWorkflow.php @@ -1,7 +1,7 @@