From bd741ffcc7afa9b5a82447137130dd31791794ac Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 13 Oct 2014 11:17:09 -0700 Subject: [PATCH] Move DarkConsole to an application Summary: Ref T5702. Primarily, this gets the custom DarkConsole URI routes out of the Aphront core and into an Application, like almost all other routes. Test Plan: Used DarkConsole. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5702 Differential Revision: https://secure.phabricator.com/D10695 --- src/__phutil_library_map__.php | 26 ++++++++++--------- ...AphrontDefaultApplicationConfiguration.php | 7 +---- .../PhabricatorConsoleApplication.php | 26 +++++++++++++++++++ .../controller}/DarkConsoleController.php | 0 .../controller}/DarkConsoleDataController.php | 0 .../console/core}/DarkConsoleCore.php | 0 .../plugin/DarkConsoleErrorLogPlugin.php | 0 .../console/plugin/DarkConsoleEventPlugin.php | 0 .../console/plugin/DarkConsolePlugin.php | 0 .../plugin/DarkConsoleRequestPlugin.php | 0 .../plugin/DarkConsoleServicesPlugin.php | 0 .../plugin/DarkConsoleXHProfPlugin.php | 0 .../errorlog/DarkConsoleErrorLogPluginAPI.php | 0 .../event/DarkConsoleEventPluginAPI.php | 0 .../xhprof/DarkConsoleXHProfPluginAPI.php | 0 15 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 src/applications/console/application/PhabricatorConsoleApplication.php rename src/{aphront/console => applications/console/controller}/DarkConsoleController.php (100%) rename src/{aphront/console => applications/console/controller}/DarkConsoleDataController.php (100%) rename src/{aphront/console => applications/console/core}/DarkConsoleCore.php (100%) rename src/{aphront => applications}/console/plugin/DarkConsoleErrorLogPlugin.php (100%) rename src/{aphront => applications}/console/plugin/DarkConsoleEventPlugin.php (100%) rename src/{aphront => applications}/console/plugin/DarkConsolePlugin.php (100%) rename src/{aphront => applications}/console/plugin/DarkConsoleRequestPlugin.php (100%) rename src/{aphront => applications}/console/plugin/DarkConsoleServicesPlugin.php (100%) rename src/{aphront => applications}/console/plugin/DarkConsoleXHProfPlugin.php (100%) rename src/{aphront => applications}/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php (100%) rename src/{aphront => applications}/console/plugin/event/DarkConsoleEventPluginAPI.php (100%) rename src/{aphront => applications}/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php (100%) diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 89702d4c17..b9a50f6d25 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -185,18 +185,18 @@ phutil_register_library_map(array( 'ConpherenceViewController' => 'applications/conpherence/controller/ConpherenceViewController.php', 'ConpherenceWidgetController' => 'applications/conpherence/controller/ConpherenceWidgetController.php', 'ConpherenceWidgetView' => 'applications/conpherence/view/ConpherenceWidgetView.php', - 'DarkConsoleController' => 'aphront/console/DarkConsoleController.php', - 'DarkConsoleCore' => 'aphront/console/DarkConsoleCore.php', - 'DarkConsoleDataController' => 'aphront/console/DarkConsoleDataController.php', - 'DarkConsoleErrorLogPlugin' => 'aphront/console/plugin/DarkConsoleErrorLogPlugin.php', - 'DarkConsoleErrorLogPluginAPI' => 'aphront/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php', - 'DarkConsoleEventPlugin' => 'aphront/console/plugin/DarkConsoleEventPlugin.php', - 'DarkConsoleEventPluginAPI' => 'aphront/console/plugin/event/DarkConsoleEventPluginAPI.php', - 'DarkConsolePlugin' => 'aphront/console/plugin/DarkConsolePlugin.php', - 'DarkConsoleRequestPlugin' => 'aphront/console/plugin/DarkConsoleRequestPlugin.php', - 'DarkConsoleServicesPlugin' => 'aphront/console/plugin/DarkConsoleServicesPlugin.php', - 'DarkConsoleXHProfPlugin' => 'aphront/console/plugin/DarkConsoleXHProfPlugin.php', - 'DarkConsoleXHProfPluginAPI' => 'aphront/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php', + 'DarkConsoleController' => 'applications/console/controller/DarkConsoleController.php', + 'DarkConsoleCore' => 'applications/console/core/DarkConsoleCore.php', + 'DarkConsoleDataController' => 'applications/console/controller/DarkConsoleDataController.php', + 'DarkConsoleErrorLogPlugin' => 'applications/console/plugin/DarkConsoleErrorLogPlugin.php', + 'DarkConsoleErrorLogPluginAPI' => 'applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php', + 'DarkConsoleEventPlugin' => 'applications/console/plugin/DarkConsoleEventPlugin.php', + 'DarkConsoleEventPluginAPI' => 'applications/console/plugin/event/DarkConsoleEventPluginAPI.php', + 'DarkConsolePlugin' => 'applications/console/plugin/DarkConsolePlugin.php', + 'DarkConsoleRequestPlugin' => 'applications/console/plugin/DarkConsoleRequestPlugin.php', + 'DarkConsoleServicesPlugin' => 'applications/console/plugin/DarkConsoleServicesPlugin.php', + 'DarkConsoleXHProfPlugin' => 'applications/console/plugin/DarkConsoleXHProfPlugin.php', + 'DarkConsoleXHProfPluginAPI' => 'applications/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php', 'DatabaseConfigurationProvider' => 'infrastructure/storage/configuration/DatabaseConfigurationProvider.php', 'DefaultDatabaseConfigurationProvider' => 'infrastructure/storage/configuration/DefaultDatabaseConfigurationProvider.php', 'DifferentialAction' => 'applications/differential/constants/DifferentialAction.php', @@ -1402,6 +1402,7 @@ phutil_register_library_map(array( 'PhabricatorConfigWelcomeController' => 'applications/config/controller/PhabricatorConfigWelcomeController.php', 'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.php', 'PhabricatorConpherenceThreadPHIDType' => 'applications/conpherence/phid/PhabricatorConpherenceThreadPHIDType.php', + 'PhabricatorConsoleApplication' => 'applications/console/application/PhabricatorConsoleApplication.php', 'PhabricatorContentSource' => 'applications/metamta/contentsource/PhabricatorContentSource.php', 'PhabricatorContentSourceView' => 'applications/metamta/contentsource/PhabricatorContentSourceView.php', 'PhabricatorController' => 'applications/base/controller/PhabricatorController.php', @@ -4382,6 +4383,7 @@ phutil_register_library_map(array( 'PhabricatorConfigWelcomeController' => 'PhabricatorConfigController', 'PhabricatorConpherenceApplication' => 'PhabricatorApplication', 'PhabricatorConpherenceThreadPHIDType' => 'PhabricatorPHIDType', + 'PhabricatorConsoleApplication' => 'PhabricatorApplication', 'PhabricatorContentSourceView' => 'AphrontView', 'PhabricatorController' => 'AphrontController', 'PhabricatorCookies' => 'Phobject', diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index 147f9849b6..3587b74b0f 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -15,12 +15,7 @@ class AphrontDefaultApplicationConfiguration } public function getURIMap() { - return $this->getResourceURIMapRules() + array( - '/~/' => array( - '' => 'DarkConsoleController', - 'data/(?P[^/]+)/' => 'DarkConsoleDataController', - ), - ); + return $this->getResourceURIMapRules(); } protected function getResourceURIMapRules() { diff --git a/src/applications/console/application/PhabricatorConsoleApplication.php b/src/applications/console/application/PhabricatorConsoleApplication.php new file mode 100644 index 0000000000..8e4398af32 --- /dev/null +++ b/src/applications/console/application/PhabricatorConsoleApplication.php @@ -0,0 +1,26 @@ + array( + '' => 'DarkConsoleController', + 'data/(?P[^/]+)/' => 'DarkConsoleDataController', + ), + ); + } + +} diff --git a/src/aphront/console/DarkConsoleController.php b/src/applications/console/controller/DarkConsoleController.php similarity index 100% rename from src/aphront/console/DarkConsoleController.php rename to src/applications/console/controller/DarkConsoleController.php diff --git a/src/aphront/console/DarkConsoleDataController.php b/src/applications/console/controller/DarkConsoleDataController.php similarity index 100% rename from src/aphront/console/DarkConsoleDataController.php rename to src/applications/console/controller/DarkConsoleDataController.php diff --git a/src/aphront/console/DarkConsoleCore.php b/src/applications/console/core/DarkConsoleCore.php similarity index 100% rename from src/aphront/console/DarkConsoleCore.php rename to src/applications/console/core/DarkConsoleCore.php diff --git a/src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php b/src/applications/console/plugin/DarkConsoleErrorLogPlugin.php similarity index 100% rename from src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php rename to src/applications/console/plugin/DarkConsoleErrorLogPlugin.php diff --git a/src/aphront/console/plugin/DarkConsoleEventPlugin.php b/src/applications/console/plugin/DarkConsoleEventPlugin.php similarity index 100% rename from src/aphront/console/plugin/DarkConsoleEventPlugin.php rename to src/applications/console/plugin/DarkConsoleEventPlugin.php diff --git a/src/aphront/console/plugin/DarkConsolePlugin.php b/src/applications/console/plugin/DarkConsolePlugin.php similarity index 100% rename from src/aphront/console/plugin/DarkConsolePlugin.php rename to src/applications/console/plugin/DarkConsolePlugin.php diff --git a/src/aphront/console/plugin/DarkConsoleRequestPlugin.php b/src/applications/console/plugin/DarkConsoleRequestPlugin.php similarity index 100% rename from src/aphront/console/plugin/DarkConsoleRequestPlugin.php rename to src/applications/console/plugin/DarkConsoleRequestPlugin.php diff --git a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php b/src/applications/console/plugin/DarkConsoleServicesPlugin.php similarity index 100% rename from src/aphront/console/plugin/DarkConsoleServicesPlugin.php rename to src/applications/console/plugin/DarkConsoleServicesPlugin.php diff --git a/src/aphront/console/plugin/DarkConsoleXHProfPlugin.php b/src/applications/console/plugin/DarkConsoleXHProfPlugin.php similarity index 100% rename from src/aphront/console/plugin/DarkConsoleXHProfPlugin.php rename to src/applications/console/plugin/DarkConsoleXHProfPlugin.php diff --git a/src/aphront/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php b/src/applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php similarity index 100% rename from src/aphront/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php rename to src/applications/console/plugin/errorlog/DarkConsoleErrorLogPluginAPI.php diff --git a/src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php b/src/applications/console/plugin/event/DarkConsoleEventPluginAPI.php similarity index 100% rename from src/aphront/console/plugin/event/DarkConsoleEventPluginAPI.php rename to src/applications/console/plugin/event/DarkConsoleEventPluginAPI.php diff --git a/src/aphront/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php b/src/applications/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php similarity index 100% rename from src/aphront/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php rename to src/applications/console/plugin/xhprof/DarkConsoleXHProfPluginAPI.php