From b2890eeb0e6f660c75cf9007ff4fe41c6aa8f295 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 9 Mar 2012 15:46:25 -0800 Subject: [PATCH] Add "final" to all Phabricator "Controller" classes Summary: These are all unambiguously unextensible. Issues I hit: - Maniphest Change/Diff controllers, just consolidated them. - Some search controllers incorrectly extend from "Search" but should extend from "SearchBase". This has no runtime effects. - D1836 introduced a closure, which we don't handle correctly (somewhat on purpose; we target PHP 5.2). See T962. Test Plan: Ran "testEverythingImplemented" unit test to identify classes extending from `final` classes. Resolved issues. Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Maniphest Tasks: T795 Differential Revision: https://secure.phabricator.com/D1843 --- src/__phutil_library_map__.php | 6 ++-- .../controller/DarkConsoleController.php | 4 +-- ...AphrontDefaultApplicationConfiguration.php | 4 +-- .../PhabricatorDisabledUserController.php | 5 ++-- .../email/PhabricatorEmailLoginController.php | 3 +- .../PhabricatorEmailTokenController.php | 3 +- .../login/PhabricatorLoginController.php | 3 +- .../logout/PhabricatorLogoutController.php | 5 ++-- .../oauth/PhabricatorOAuthLoginController.php | 3 +- .../PhabricatorOAuthDiagnosticsController.php | 2 +- ...atorOAuthDefaultRegistrationController.php | 2 +- .../PhabricatorRefreshCSRFController.php | 4 +-- .../PhabricatorOAuthUnlinkController.php | 2 +- .../PhabricatorLoginValidateController.php | 3 +- .../404/Phabricator404Controller.php | 4 +-- .../PhabricatorRedirectController.php | 4 +-- .../PhabricatorCalendarBrowseController.php | 4 +-- .../api/PhabricatorConduitAPIController.php | 2 +- .../PhabricatorConduitConsoleController.php | 2 +- .../log/PhabricatorConduitLogController.php | 3 +- .../PhabricatorConduitTokenController.php | 3 +- .../PhabricatorCountdownDeleteController.php | 2 +- .../PhabricatorCountdownEditController.php | 2 +- .../PhabricatorCountdownListController.php | 4 +-- .../PhabricatorCountdownViewController.php | 2 +- ...PhabricatorDaemonCombinedLogController.php | 4 +-- .../PhabricatorDaemonConsoleController.php | 3 +- .../PhabricatorDaemonLogListController.php | 5 ++-- .../PhabricatorDaemonLogViewController.php | 5 ++-- ...ricatorDaemonTimelineConsoleController.php | 4 +-- ...abricatorDaemonTimelineEventController.php | 4 +-- .../PhabricatorWorkerTaskDetailController.php | 2 +- .../PhabricatorWorkerTaskUpdateController.php | 2 +- .../DifferentialChangesetViewController.php | 2 +- .../DifferentialCommentPreviewController.php | 3 +- .../DifferentialCommentSaveController.php | 2 +- .../DifferentialDiffCreateController.php | 4 +-- .../DifferentialDiffViewController.php | 2 +- ...ifferentialInlineCommentEditController.php | 3 +- ...erentialInlineCommentPreviewController.php | 4 +-- .../DifferentialRevisionEditController.php | 4 +-- .../DifferentialRevisionListController.php | 2 +- .../DifferentialRevisionStatsController.php | 2 +- .../DifferentialRevisionViewController.php | 2 +- .../DifferentialSubscribeController.php | 4 +-- .../browse/DiffusionBrowseController.php | 2 +- .../change/DiffusionChangeController.php | 2 +- .../commit/DiffusionCommitController.php | 2 +- .../diff/DiffusionDiffController.php | 4 +-- .../file/DiffusionBrowseFileController.php | 2 +- .../history/DiffusionHistoryController.php | 2 +- .../home/DiffusionHomeController.php | 4 +-- .../DiffusionLastModifiedController.php | 4 +-- .../DiffusionPathCompleteController.php | 4 +-- .../DiffusionPathValidateController.php | 4 +-- .../DiffusionRepositoryController.php | 2 +- .../symbol/DiffusionSymbolController.php | 4 +-- ...catorDirectoryCategoryDeleteController.php | 2 +- ...ricatorDirectoryCategoryEditController.php | 2 +- ...abricatorDirectoryItemDeleteController.php | 2 +- ...PhabricatorDirectoryItemEditController.php | 2 +- .../PhabricatorDirectoryMainController.php | 2 +- .../PhabricatorFileDeleteController.php | 2 +- .../PhabricatorFileDropUploadController.php | 5 ++-- .../list/PhabricatorFileListController.php | 2 +- .../PhabricatorFileMacroDeleteController.php | 5 ++-- .../PhabricatorFileMacroEditController.php | 5 ++-- .../PhabricatorFileMacroListController.php | 4 ++- .../proxy/PhabricatorFileProxyController.php | 2 +- .../PhabricatorFileTransformController.php | 3 +- .../PhabricatorFileUploadController.php | 4 +-- ...bricatorHelpKeyboardShortcutController.php | 4 +-- .../all/HeraldAllRulesController.php | 2 +- .../delete/HeraldDeleteController.php | 4 +-- .../HeraldRuleEditHistoryController.php | 2 +- .../controller/home/HeraldHomeController.php | 2 +- .../controller/new/HeraldNewController.php | 2 +- .../controller/rule/HeraldRuleController.php | 2 +- .../test/HeraldTestConsoleController.php | 2 +- .../transcript/HeraldTranscriptController.php | 2 +- .../HeraldTranscriptListController.php | 4 +-- ...niphestTaskDescriptionChangeController.php | 9 ++++-- ...ManiphestTaskDescriptionDiffController.php | 29 ------------------- .../controller/descriptiondiff/__init__.php | 12 -------- ...iphestTaskDescriptionPreviewController.php | 3 +- .../ManiphestTaskDetailController.php | 2 +- .../taskedit/ManiphestTaskEditController.php | 2 +- .../tasklist/ManiphestTaskListController.php | 2 +- .../ManiphestTransactionPreviewController.php | 4 +-- .../ManiphestTransactionSaveController.php | 4 +-- .../ManiphestTransactionListView.php | 2 +- .../list/PhabricatorMetaMTAListController.php | 3 +- ...icatorMetaMTAMailingListEditController.php | 2 +- ...abricatorMetaMTAMailingListsController.php | 2 +- .../PhabricatorMetaMTAReceiveController.php | 4 +-- ...abricatorMetaMTAReceivedListController.php | 4 +-- .../send/PhabricatorMetaMTASendController.php | 3 +- ...icatorMetaMTASendGridReceiveController.php | 2 +- .../view/PhabricatorMetaMTAViewController.php | 3 +- .../PhabricatorOwnersDeleteController.php | 5 ++-- .../PhabricatorOwnersDetailController.php | 3 +- .../edit/PhabricatorOwnersEditController.php | 3 +- .../list/PhabricatorOwnersListController.php | 3 +- .../list/PhabricatorPasteListController.php | 4 +-- .../view/PhabricatorPasteViewController.php | 2 +- .../edit/PhabricatorPeopleEditController.php | 3 +- .../list/PhabricatorPeopleListController.php | 5 ++-- .../logs/PhabricatorPeopleLogsController.php | 5 ++-- .../PhabricatorPeopleProfileController.php | 3 +- .../PhabricatorUserSettingsController.php | 3 +- ...atorUserAccountSettingsPanelController.php | 4 +-- ...atorUserConduitSettingsPanelController.php | 4 +-- ...icatorUserEmailSettingsPanelController.php | 4 +-- ...EmailPreferenceSettingsPanelController.php | 2 +- ...icatorUserOAuthSettingsPanelController.php | 2 +- ...torUserPasswordSettingsPanelController.php | 4 +-- ...rUserPreferenceSettingsPanelController.php | 2 +- ...atorUserProfileSettingsPanelController.php | 2 +- ...atorUserSSHKeysSettingsPanelController.php | 4 +-- .../PhabricatorPHIDLookupController.php | 2 +- .../delete/PhrictionDeleteController.php | 4 +-- .../diff/PhrictionDiffController.php | 4 +-- .../document/PhrictionDocumentController.php | 2 +- .../PhrictionDocumentPreviewController.php | 2 +- .../edit/PhrictionEditController.php | 2 +- .../history/PhrictionHistoryController.php | 4 +-- .../list/PhrictionListController.php | 4 +-- .../PhabricatorProjectCreateController.php | 2 +- .../list/PhabricatorProjectListController.php | 2 +- .../PhabricatorProjectProfileController.php | 2 +- ...habricatorProjectProfileEditController.php | 2 +- .../PhabricatorProjectUpdateController.php | 2 +- ...epositoryArcanistProjectEditController.php | 2 +- .../PhabricatorRepositoryCreateController.php | 4 +-- .../PhabricatorRepositoryDeleteController.php | 4 +-- .../PhabricatorRepositoryEditController.php | 2 +- .../PhabricatorRepositoryListController.php | 4 +-- .../PhabricatorSearchAttachController.php | 5 ++-- .../search/controller/attach/__init__.php | 2 +- .../PhabricatorSearchIndexController.php | 5 ++-- .../search/PhabricatorSearchController.php | 4 ++- .../PhabricatorSearchSelectController.php | 6 ++-- .../search/controller/select/__init__.php | 2 +- .../PhabricatorSlowvoteCreateController.php | 4 +-- .../PhabricatorSlowvoteListController.php | 4 +-- .../PhabricatorSlowvotePollController.php | 2 +- .../base/PhabricatorStatusController.php | 4 +-- ...torTypeaheadCommonDatasourceController.php | 2 +- .../PhabricatorUIExampleRenderController.php | 4 +-- .../PhabricatorXHPASTViewRunController.php | 4 +-- .../PhabricatorXHPASTViewFrameController.php | 4 +-- ...habricatorXHPASTViewFramesetController.php | 4 +-- .../PhabricatorXHPASTViewInputController.php | 4 +-- .../PhabricatorXHPASTViewStreamController.php | 4 +-- .../PhabricatorXHPASTViewTreeController.php | 4 +-- .../PhabricatorXHProfProfileController.php | 2 +- .../controller/CelerityResourceController.php | 4 +-- .../dao/__tests__/LiskIsolationTestCase.php | 18 ++++++++---- 158 files changed, 276 insertions(+), 273 deletions(-) delete mode 100644 src/applications/maniphest/controller/descriptiondiff/ManiphestTaskDescriptionDiffController.php delete mode 100644 src/applications/maniphest/controller/descriptiondiff/__init__.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 6fd8ff642a..25bd89cbb4 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -422,7 +422,6 @@ phutil_register_library_map(array( 'ManiphestTask' => 'applications/maniphest/storage/task', 'ManiphestTaskAuxiliaryStorage' => 'applications/maniphest/storage/auxiliary', 'ManiphestTaskDescriptionChangeController' => 'applications/maniphest/controller/descriptionchange', - 'ManiphestTaskDescriptionDiffController' => 'applications/maniphest/controller/descriptiondiff', 'ManiphestTaskDescriptionPreviewController' => 'applications/maniphest/controller/descriptionpreview', 'ManiphestTaskDetailController' => 'applications/maniphest/controller/taskdetail', 'ManiphestTaskEditController' => 'applications/maniphest/controller/taskedit', @@ -1232,7 +1231,6 @@ phutil_register_library_map(array( 'ManiphestTask' => 'ManiphestDAO', 'ManiphestTaskAuxiliaryStorage' => 'ManiphestDAO', 'ManiphestTaskDescriptionChangeController' => 'ManiphestController', - 'ManiphestTaskDescriptionDiffController' => 'ManiphestTaskDescriptionChangeController', 'ManiphestTaskDescriptionPreviewController' => 'ManiphestController', 'ManiphestTaskDetailController' => 'ManiphestController', 'ManiphestTaskEditController' => 'ManiphestController', @@ -1522,7 +1520,7 @@ phutil_register_library_map(array( 'PhabricatorRepositorySymbol' => 'PhabricatorRepositoryDAO', 'PhabricatorRepositoryTestCase' => 'PhabricatorTestCase', 'PhabricatorS3FileStorageEngine' => 'PhabricatorFileStorageEngine', - 'PhabricatorSearchAttachController' => 'PhabricatorSearchController', + 'PhabricatorSearchAttachController' => 'PhabricatorSearchBaseController', 'PhabricatorSearchBaseController' => 'PhabricatorController', 'PhabricatorSearchCommitIndexer' => 'PhabricatorSearchDocumentIndexer', 'PhabricatorSearchController' => 'PhabricatorSearchBaseController', @@ -1537,7 +1535,7 @@ phutil_register_library_map(array( 'PhabricatorSearchPhrictionIndexer' => 'PhabricatorSearchDocumentIndexer', 'PhabricatorSearchQuery' => 'PhabricatorSearchDAO', 'PhabricatorSearchResultView' => 'AphrontView', - 'PhabricatorSearchSelectController' => 'PhabricatorSearchController', + 'PhabricatorSearchSelectController' => 'PhabricatorSearchBaseController', 'PhabricatorSearchUserIndexer' => 'PhabricatorSearchDocumentIndexer', 'PhabricatorSlowvoteChoice' => 'PhabricatorSlowvoteDAO', 'PhabricatorSlowvoteComment' => 'PhabricatorSlowvoteDAO', diff --git a/src/aphront/console/controller/DarkConsoleController.php b/src/aphront/console/controller/DarkConsoleController.php index 92bc1be753..9b0aebe7df 100644 --- a/src/aphront/console/controller/DarkConsoleController.php +++ b/src/aphront/console/controller/DarkConsoleController.php @@ -1,7 +1,7 @@ array( 'create/' => 'ManiphestTaskEditController', 'edit/(?P\d+)/' => 'ManiphestTaskEditController', - 'descriptionchange/(?P\d+)/' => + 'descriptionchange/(?:(?P\d+)/)?' => 'ManiphestTaskDescriptionChangeController', - 'descriptiondiff/' => - 'ManiphestTaskDescriptionDiffController', 'descriptionpreview/' => 'ManiphestTaskDescriptionPreviewController', ), diff --git a/src/applications/auth/controller/disabled/PhabricatorDisabledUserController.php b/src/applications/auth/controller/disabled/PhabricatorDisabledUserController.php index e689876b49..02008b7b28 100644 --- a/src/applications/auth/controller/disabled/PhabricatorDisabledUserController.php +++ b/src/applications/auth/controller/disabled/PhabricatorDisabledUserController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/auth/controller/unlink/PhabricatorOAuthUnlinkController.php b/src/applications/auth/controller/unlink/PhabricatorOAuthUnlinkController.php index d94c9af343..6d7de0192f 100644 --- a/src/applications/auth/controller/unlink/PhabricatorOAuthUnlinkController.php +++ b/src/applications/auth/controller/unlink/PhabricatorOAuthUnlinkController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorOAuthUnlinkController extends PhabricatorAuthController { +final class PhabricatorOAuthUnlinkController extends PhabricatorAuthController { private $provider; diff --git a/src/applications/auth/controller/validate/PhabricatorLoginValidateController.php b/src/applications/auth/controller/validate/PhabricatorLoginValidateController.php index 838dbf96b6..e8b3de5045 100644 --- a/src/applications/auth/controller/validate/PhabricatorLoginValidateController.php +++ b/src/applications/auth/controller/validate/PhabricatorLoginValidateController.php @@ -16,7 +16,8 @@ * limitations under the License. */ -class PhabricatorLoginValidateController extends PhabricatorAuthController { +final class PhabricatorLoginValidateController + extends PhabricatorAuthController { public function shouldRequireLogin() { return false; diff --git a/src/applications/base/controller/404/Phabricator404Controller.php b/src/applications/base/controller/404/Phabricator404Controller.php index 591e7a3c3e..643ffdcfd6 100644 --- a/src/applications/base/controller/404/Phabricator404Controller.php +++ b/src/applications/base/controller/404/Phabricator404Controller.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php b/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php index 7579e4192c..ad56c11ad5 100644 --- a/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php +++ b/src/applications/conduit/controller/token/PhabricatorConduitTokenController.php @@ -19,7 +19,8 @@ /** * @group conduit */ -class PhabricatorConduitTokenController extends PhabricatorConduitController { +final class PhabricatorConduitTokenController + extends PhabricatorConduitController { public function processRequest() { diff --git a/src/applications/countdown/controller/delete/PhabricatorCountdownDeleteController.php b/src/applications/countdown/controller/delete/PhabricatorCountdownDeleteController.php index 97e6963609..6798c4f819 100644 --- a/src/applications/countdown/controller/delete/PhabricatorCountdownDeleteController.php +++ b/src/applications/countdown/controller/delete/PhabricatorCountdownDeleteController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorCountdownDeleteController +final class PhabricatorCountdownDeleteController extends PhabricatorCountdownController { public function willProcessRequest(array $data) { diff --git a/src/applications/countdown/controller/edit/PhabricatorCountdownEditController.php b/src/applications/countdown/controller/edit/PhabricatorCountdownEditController.php index 854e395aae..5853b912be 100644 --- a/src/applications/countdown/controller/edit/PhabricatorCountdownEditController.php +++ b/src/applications/countdown/controller/edit/PhabricatorCountdownEditController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorCountdownEditController +final class PhabricatorCountdownEditController extends PhabricatorCountdownController { private $id; diff --git a/src/applications/countdown/controller/list/PhabricatorCountdownListController.php b/src/applications/countdown/controller/list/PhabricatorCountdownListController.php index 1e23fe181c..2291f8f0db 100644 --- a/src/applications/countdown/controller/list/PhabricatorCountdownListController.php +++ b/src/applications/countdown/controller/list/PhabricatorCountdownListController.php @@ -1,7 +1,7 @@ loadAllWhere( diff --git a/src/applications/daemon/controller/loglist/PhabricatorDaemonLogListController.php b/src/applications/daemon/controller/loglist/PhabricatorDaemonLogListController.php index eb69979409..feeac6e023 100644 --- a/src/applications/daemon/controller/loglist/PhabricatorDaemonLogListController.php +++ b/src/applications/daemon/controller/loglist/PhabricatorDaemonLogListController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/daemon/controller/logview/PhabricatorDaemonLogViewController.php b/src/applications/daemon/controller/logview/PhabricatorDaemonLogViewController.php index ffb95ecd9e..4482d39811 100644 --- a/src/applications/daemon/controller/logview/PhabricatorDaemonLogViewController.php +++ b/src/applications/daemon/controller/logview/PhabricatorDaemonLogViewController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php b/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php index b7cd188dae..b3b91298c4 100644 --- a/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php +++ b/src/applications/differential/controller/diffcreate/DifferentialDiffCreateController.php @@ -1,7 +1,7 @@ diffusionRequest; diff --git a/src/applications/diffusion/controller/change/DiffusionChangeController.php b/src/applications/diffusion/controller/change/DiffusionChangeController.php index 79b01e8183..862492783f 100644 --- a/src/applications/diffusion/controller/change/DiffusionChangeController.php +++ b/src/applications/diffusion/controller/change/DiffusionChangeController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class DiffusionChangeController extends DiffusionController { +final class DiffusionChangeController extends DiffusionController { public function processRequest() { $drequest = $this->diffusionRequest; diff --git a/src/applications/diffusion/controller/commit/DiffusionCommitController.php b/src/applications/diffusion/controller/commit/DiffusionCommitController.php index 858a52f51a..4b524e1674 100644 --- a/src/applications/diffusion/controller/commit/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/commit/DiffusionCommitController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class DiffusionCommitController extends DiffusionController { +final class DiffusionCommitController extends DiffusionController { const CHANGES_LIMIT = 100; diff --git a/src/applications/diffusion/controller/diff/DiffusionDiffController.php b/src/applications/diffusion/controller/diff/DiffusionDiffController.php index ba5acb80ba..33eac0dd36 100644 --- a/src/applications/diffusion/controller/diff/DiffusionDiffController.php +++ b/src/applications/diffusion/controller/diff/DiffusionDiffController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php index 18cd2b47b4..2b16b36683 100644 --- a/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/file/DiffusionBrowseFileController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class DiffusionBrowseFileController extends DiffusionController { +final class DiffusionBrowseFileController extends DiffusionController { // Image types we want to display inline using tags protected $imageTypes = array( diff --git a/src/applications/diffusion/controller/history/DiffusionHistoryController.php b/src/applications/diffusion/controller/history/DiffusionHistoryController.php index 499955d03d..5cd766e4c0 100644 --- a/src/applications/diffusion/controller/history/DiffusionHistoryController.php +++ b/src/applications/diffusion/controller/history/DiffusionHistoryController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class DiffusionHistoryController extends DiffusionController { +final class DiffusionHistoryController extends DiffusionController { public function processRequest() { $drequest = $this->diffusionRequest; diff --git a/src/applications/diffusion/controller/home/DiffusionHomeController.php b/src/applications/diffusion/controller/home/DiffusionHomeController.php index a5fdc4e7b7..52f3a323e2 100644 --- a/src/applications/diffusion/controller/home/DiffusionHomeController.php +++ b/src/applications/diffusion/controller/home/DiffusionHomeController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/diffusion/controller/lastmodified/DiffusionLastModifiedController.php b/src/applications/diffusion/controller/lastmodified/DiffusionLastModifiedController.php index 1e64fd66eb..26380b6848 100644 --- a/src/applications/diffusion/controller/lastmodified/DiffusionLastModifiedController.php +++ b/src/applications/diffusion/controller/lastmodified/DiffusionLastModifiedController.php @@ -1,7 +1,7 @@ getDiffusionRequest(); diff --git a/src/applications/diffusion/controller/pathcomplete/DiffusionPathCompleteController.php b/src/applications/diffusion/controller/pathcomplete/DiffusionPathCompleteController.php index 4536a643cd..2efcbdd60f 100644 --- a/src/applications/diffusion/controller/pathcomplete/DiffusionPathCompleteController.php +++ b/src/applications/diffusion/controller/pathcomplete/DiffusionPathCompleteController.php @@ -1,7 +1,7 @@ diffusionRequest; diff --git a/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php b/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php index d042488cdd..c11e5965ad 100644 --- a/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php +++ b/src/applications/diffusion/controller/symbol/DiffusionSymbolController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/files/controller/list/PhabricatorFileListController.php b/src/applications/files/controller/list/PhabricatorFileListController.php index 7aa7c24e10..00db73770f 100644 --- a/src/applications/files/controller/list/PhabricatorFileListController.php +++ b/src/applications/files/controller/list/PhabricatorFileListController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorFileListController extends PhabricatorFileController { +final class PhabricatorFileListController extends PhabricatorFileController { private $filter; private $showUploader; diff --git a/src/applications/files/controller/macrodelete/PhabricatorFileMacroDeleteController.php b/src/applications/files/controller/macrodelete/PhabricatorFileMacroDeleteController.php index d8d8187f89..b5f8c2e819 100644 --- a/src/applications/files/controller/macrodelete/PhabricatorFileMacroDeleteController.php +++ b/src/applications/files/controller/macrodelete/PhabricatorFileMacroDeleteController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/files/controller/proxy/PhabricatorFileProxyController.php b/src/applications/files/controller/proxy/PhabricatorFileProxyController.php index 1b29b874ff..8c449fcdc8 100644 --- a/src/applications/files/controller/proxy/PhabricatorFileProxyController.php +++ b/src/applications/files/controller/proxy/PhabricatorFileProxyController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorFileProxyController extends PhabricatorFileController { +final class PhabricatorFileProxyController extends PhabricatorFileController { private $uri; diff --git a/src/applications/files/controller/transform/PhabricatorFileTransformController.php b/src/applications/files/controller/transform/PhabricatorFileTransformController.php index dca8e11598..06475cb8c0 100644 --- a/src/applications/files/controller/transform/PhabricatorFileTransformController.php +++ b/src/applications/files/controller/transform/PhabricatorFileTransformController.php @@ -16,7 +16,8 @@ * limitations under the License. */ -class PhabricatorFileTransformController extends PhabricatorFileController { +final class PhabricatorFileTransformController + extends PhabricatorFileController { private $transform; private $phid; diff --git a/src/applications/files/controller/upload/PhabricatorFileUploadController.php b/src/applications/files/controller/upload/PhabricatorFileUploadController.php index fed5387517..fd367f9bd0 100644 --- a/src/applications/files/controller/upload/PhabricatorFileUploadController.php +++ b/src/applications/files/controller/upload/PhabricatorFileUploadController.php @@ -1,7 +1,7 @@ setTransactionID($data['id']); + $this->setTransactionID(idx($data, 'id')); } public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); + if (!$this->getTransactionID()) { + $this->setTransactionID($this->getRequest()->getStr('ref')); + } + $transaction_id = $this->getTransactionID(); $transaction = id(new ManiphestTransaction())->load($transaction_id); if (!$transaction) { diff --git a/src/applications/maniphest/controller/descriptiondiff/ManiphestTaskDescriptionDiffController.php b/src/applications/maniphest/controller/descriptiondiff/ManiphestTaskDescriptionDiffController.php deleted file mode 100644 index e9e00eddd4..0000000000 --- a/src/applications/maniphest/controller/descriptiondiff/ManiphestTaskDescriptionDiffController.php +++ /dev/null @@ -1,29 +0,0 @@ -getRequest()->getStr('ref'); - $this->setTransactionID($ref); - } -} diff --git a/src/applications/maniphest/controller/descriptiondiff/__init__.php b/src/applications/maniphest/controller/descriptiondiff/__init__.php deleted file mode 100644 index 7e1ba1bbda..0000000000 --- a/src/applications/maniphest/controller/descriptiondiff/__init__.php +++ /dev/null @@ -1,12 +0,0 @@ -getRequest(); diff --git a/src/applications/maniphest/view/transactionlist/ManiphestTransactionListView.php b/src/applications/maniphest/view/transactionlist/ManiphestTransactionListView.php index 66a912d131..417d94f3a6 100644 --- a/src/applications/maniphest/view/transactionlist/ManiphestTransactionListView.php +++ b/src/applications/maniphest/view/transactionlist/ManiphestTransactionListView.php @@ -96,7 +96,7 @@ class ManiphestTransactionListView extends ManiphestView { require_celerity_resource('syntax-highlighting-css'); $whitespace_mode = DifferentialChangesetParser::WHITESPACE_SHOW_ALL; Javelin::initBehavior('differential-show-more', array( - 'uri' => '/maniphest/task/descriptiondiff/', + 'uri' => '/maniphest/task/descriptionchange/', 'whitespace' => $whitespace_mode, )); } diff --git a/src/applications/metamta/controller/list/PhabricatorMetaMTAListController.php b/src/applications/metamta/controller/list/PhabricatorMetaMTAListController.php index 325077d5f1..459ebc08db 100644 --- a/src/applications/metamta/controller/list/PhabricatorMetaMTAListController.php +++ b/src/applications/metamta/controller/list/PhabricatorMetaMTAListController.php @@ -16,7 +16,8 @@ * limitations under the License. */ -class PhabricatorMetaMTAListController extends PhabricatorMetaMTAController { +final class PhabricatorMetaMTAListController + extends PhabricatorMetaMTAController { public function processRequest() { // Get a page of mails together with pager. diff --git a/src/applications/metamta/controller/mailinglistedit/PhabricatorMetaMTAMailingListEditController.php b/src/applications/metamta/controller/mailinglistedit/PhabricatorMetaMTAMailingListEditController.php index 3d40143bf5..b90dc60a20 100644 --- a/src/applications/metamta/controller/mailinglistedit/PhabricatorMetaMTAMailingListEditController.php +++ b/src/applications/metamta/controller/mailinglistedit/PhabricatorMetaMTAMailingListEditController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorMetaMTAMailingListEditController +final class PhabricatorMetaMTAMailingListEditController extends PhabricatorMetaMTAController { private $id; diff --git a/src/applications/metamta/controller/mailinglists/PhabricatorMetaMTAMailingListsController.php b/src/applications/metamta/controller/mailinglists/PhabricatorMetaMTAMailingListsController.php index 858d6fb38b..6dbb57117b 100644 --- a/src/applications/metamta/controller/mailinglists/PhabricatorMetaMTAMailingListsController.php +++ b/src/applications/metamta/controller/mailinglists/PhabricatorMetaMTAMailingListsController.php @@ -16,7 +16,7 @@ * limitations under the License. */ -class PhabricatorMetaMTAMailingListsController +final class PhabricatorMetaMTAMailingListsController extends PhabricatorMetaMTAController { public function processRequest() { diff --git a/src/applications/metamta/controller/receive/PhabricatorMetaMTAReceiveController.php b/src/applications/metamta/controller/receive/PhabricatorMetaMTAReceiveController.php index 7fef2f7907..13e26ca51d 100644 --- a/src/applications/metamta/controller/receive/PhabricatorMetaMTAReceiveController.php +++ b/src/applications/metamta/controller/receive/PhabricatorMetaMTAReceiveController.php @@ -1,7 +1,7 @@ getRequest(); diff --git a/src/applications/people/controller/logs/PhabricatorPeopleLogsController.php b/src/applications/people/controller/logs/PhabricatorPeopleLogsController.php index 545a2ee27c..178b32fb04 100644 --- a/src/applications/people/controller/logs/PhabricatorPeopleLogsController.php +++ b/src/applications/people/controller/logs/PhabricatorPeopleLogsController.php @@ -1,7 +1,7 @@ save(); $dao->makeEphemeral(); - $this->assertException( - 'LiskEphemeralObjectException', - function() use ($dao) { - $dao->save(); - } - ); + $this->tryTestCases( + array( + $dao, + ), + array( + false, + ), + array($this, 'saveDAO')); + } + + public function saveDAO($dao) { + $dao->save(); } public function testIsolationContainment() {