diff --git a/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php --- a/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php +++ b/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php @@ -192,20 +192,6 @@ return; } - $event = new PhabricatorEvent( - PhabricatorEventType::TYPE_MANIPHEST_WILLEDITTASK, - array( - 'task' => $task, - 'new' => $is_new, - 'transactions' => $transactions, - )); - $event->setUser($request->getUser()); - $event->setConduitRequest($request); - PhutilEventEngine::dispatchEvent($event); - - $task = $event->getValue('task'); - $transactions = $event->getValue('transactions'); - $content_source = PhabricatorContentSource::newForSource( PhabricatorContentSource::SOURCE_CONDUIT, array()); @@ -221,17 +207,6 @@ $editor->applyTransactions($task, $transactions); - $event = new PhabricatorEvent( - PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK, - array( - 'task' => $task, - 'new' => $is_new, - 'transactions' => $transactions, - )); - $event->setUser($request->getUser()); - $event->setConduitRequest($request); - PhutilEventEngine::dispatchEvent($event); - // reload the task now that we've done all the fun stuff return id(new ManiphestTaskQuery()) ->setViewer($request->getUser()) diff --git a/src/docs/user/userguide/events.diviner b/src/docs/user/userguide/events.diviner --- a/src/docs/user/userguide/events.diviner +++ b/src/docs/user/userguide/events.diviner @@ -5,6 +5,10 @@ = Overview = +(WARNING) The event system is an artifact of a bygone era. Use of the event +system is strongly discouraged. We have been removing events since 2013 and +will continue to remove events in the future. + Phabricator and Arcanist allow you to install custom runtime event listeners which can react to certain things happening (like a Maniphest Task being edited or a user creating a new Differential Revision) and run custom code to perform @@ -130,42 +134,6 @@ - `specification` Parameters that will be used to invoke the `differential.createrevision` Conduit call. -== Maniphest: Will Edit Task == - -The constant for this event is -`PhabricatorEventType::TYPE_MANIPHEST_WILLEDITTASK`. - -This event is dispatched before a task is edited, and allows you to respond to -or alter the edit. Data available on this event: - - - `task` The @{class:ManiphestTask} being edited. - - `transactions` The list of edits (objects of class - @{class:ManiphestTransaction}) being applied. - - `new` A boolean indicating if this task is being created. - - `mail` If this edit originates from email, the - @{class:PhabricatorMetaMTAReceivedMail} object. - -This is similar to the next event (did edit task) but occurs before the edit -begins. - -== Maniphest: Did Edit Task == - -The constant for this event is -`PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK`. - -This event is dispatched after a task is edited, and allows you to react to the -edit. Data available on this event: - - - `task` The @{class:ManiphestTask} that was edited. - - `transactions` The list of edits (objects of class - @{class:ManiphestTransaction}) that were applied. - - `new` A boolean indicating if this task was newly created. - - `mail` If this edit originates from email, the - @{class:PhabricatorMetaMTAReceivedMail} object. - -This is similar to the previous event (will edit task) but occurs after the -edit completes. - == Differential: Will Mark Generated == The constant for this event is diff --git a/src/infrastructure/events/constant/PhabricatorEventType.php b/src/infrastructure/events/constant/PhabricatorEventType.php --- a/src/infrastructure/events/constant/PhabricatorEventType.php +++ b/src/infrastructure/events/constant/PhabricatorEventType.php @@ -6,9 +6,6 @@ */ final class PhabricatorEventType extends PhutilEventType { - const TYPE_MANIPHEST_WILLEDITTASK = 'maniphest.willEditTask'; - const TYPE_MANIPHEST_DIDEDITTASK = 'maniphest.didEditTask'; - const TYPE_DIFFERENTIAL_WILLMARKGENERATED = 'differential.willMarkGenerated'; const TYPE_DIFFUSION_DIDDISCOVERCOMMIT = 'diffusion.didDiscoverCommit';