From 2d15c3c062895daf7fe04cfdcd68d65fe5879149 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 2 Jun 2015 22:12:45 +1000 Subject: [PATCH] Tidy up ManiphestTask destruction Summary: Now that `ManiphestTask` implements `PhabricatorApplicationTransactionInterface`, the transaction removal happens automatically. Test Plan: Used `./bin/remove destroy` to delete a `ManiphestTask` and saw related transactions removed as well. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13110 --- src/applications/maniphest/storage/ManiphestTask.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php index 3e133fe65e..cdf4b4a575 100644 --- a/src/applications/maniphest/storage/ManiphestTask.php +++ b/src/applications/maniphest/storage/ManiphestTask.php @@ -352,17 +352,7 @@ final class ManiphestTask extends ManiphestDAO PhabricatorDestructionEngine $engine) { $this->openTransaction(); - - // TODO: Once this implements PhabricatorTransactionInterface, this - // will be handled automatically and can be removed. - $xactions = id(new ManiphestTransaction())->loadAllWhere( - 'objectPHID = %s', - $this->getPHID()); - foreach ($xactions as $xaction) { - $engine->destroyObject($xaction); - } - - $this->delete(); + $this->delete(); $this->saveTransaction(); }