From 22ee37e8b5281aa350a5b4bd9800abfc6ff93403 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 2 Jan 2015 09:48:34 +1100 Subject: [PATCH] Make the `PhabricatorApplication::getName()` method abstract Summary: In D10027, the `getName()` method was added to `PhabricatorApplication` to //allow// applications to explicitly declare their names rather than relying on the name being inferred from the name of the `PhabricatorApplication` subclass. I feel that sufficient time has passed such that we can //require// applications to explicitly declare their names. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D11119 --- .../base/PhabricatorApplication.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index fd8a8ca43c..43f39cd500 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -28,23 +28,7 @@ abstract class PhabricatorApplication implements PhabricatorPolicyInterface { /* -( Application Information )-------------------------------------------- */ - - /** - * TODO: This should be abstract, but is not for historical reasons. - */ - public function getName() { - phutil_deprecated( - 'Automatic naming of `PhabricatorApplication` classes.', - 'You should override the `getName` method.'); - - $match = null; - $regex = '/^PhabricatorApplication([A-Z][a-zA-Z]*)$/'; - if (preg_match($regex, get_class($this), $match)) { - return $match[1]; - } - - throw new PhutilMethodNotImplementedException(); - } + public abstract function getName(); public function getShortDescription() { return $this->getName().' Application';