From 14e3c727cc4da889fb7f218125addd7b1974bce3 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 16 Jun 2014 04:49:51 +1000 Subject: [PATCH] Allow Arcanist Projects to be deleted using `./bin/remove destroy`. Summary: Self-explanatory. Test Plan: Created (and destroyed) an arcanist project. Verified that the deletion actually happened. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T4749 Differential Revision: https://secure.phabricator.com/D9353 --- .../PhabricatorRepositoryArcanistProject.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php b/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php index 444cb10c4a..aca35ff3ab 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php +++ b/src/applications/repository/storage/PhabricatorRepositoryArcanistProject.php @@ -5,7 +5,8 @@ */ final class PhabricatorRepositoryArcanistProject extends PhabricatorRepositoryDAO - implements PhabricatorPolicyInterface { + implements PhabricatorPolicyInterface, + PhabricatorDestructableInterface { protected $name; protected $repositoryID; @@ -90,4 +91,15 @@ final class PhabricatorRepositoryArcanistProject return null; } + +/* -( PhabricatorDestructableInterface )----------------------------------- */ + + public function destroyObjectPermanently( + PhabricatorDestructionEngine $engine) { + + $this->openTransaction(); + $this->delete(); + $this->saveTransaction(); + } + }