@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Replace ReleephFieldSpecificationIncompleteException with the CustomField version

Summary: Ref T3718. Releeph has a custom implementation of this exception; a more general version exists in CustomField. Use the more general one. Nothing catches the specific one.

Test Plan: `grep`

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3718

Differential Revision: https://secure.phabricator.com/D6782

+6 -26
-2
src/__phutil_library_map__.php
··· 1964 1964 'ReleephFieldParseException' => 'applications/releeph/field/exception/ReleephFieldParseException.php', 1965 1965 'ReleephFieldSelector' => 'applications/releeph/field/selector/ReleephFieldSelector.php', 1966 1966 'ReleephFieldSpecification' => 'applications/releeph/field/specification/ReleephFieldSpecification.php', 1967 - 'ReleephFieldSpecificationIncompleteException' => 'applications/releeph/field/exception/ReleephFieldSpecificationIncompleteException.php', 1968 1967 'ReleephIntentFieldSpecification' => 'applications/releeph/field/specification/ReleephIntentFieldSpecification.php', 1969 1968 'ReleephLevelFieldSpecification' => 'applications/releeph/field/specification/ReleephLevelFieldSpecification.php', 1970 1969 'ReleephOriginalCommitFieldSpecification' => 'applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php', ··· 4149 4148 0 => 'PhabricatorCustomField', 4150 4149 1 => 'PhabricatorMarkupInterface', 4151 4150 ), 4152 - 'ReleephFieldSpecificationIncompleteException' => 'Exception', 4153 4151 'ReleephIntentFieldSpecification' => 'ReleephFieldSpecification', 4154 4152 'ReleephLevelFieldSpecification' => 'ReleephFieldSpecification', 4155 4153 'ReleephOriginalCommitFieldSpecification' => 'ReleephFieldSpecification',
-11
src/applications/releeph/field/exception/ReleephFieldSpecificationIncompleteException.php
··· 1 - <?php 2 - 3 - final class ReleephFieldSpecificationIncompleteException extends Exception { 4 - 5 - public function __construct(ReleephFieldSpecification $field) { 6 - $class = get_class($field); 7 - parent::__construct( 8 - "Releeph field class {$class} is incompletely implemented."); 9 - } 10 - 11 - }
+4 -4
src/applications/releeph/field/specification/ReleephFieldSpecification.php
··· 24 24 public function getRequiredStorageKey() { 25 25 $key = $this->getStorageKey(); 26 26 if ($key === null) { 27 - throw new ReleephFieldSpecificationIncompleteException($this); 27 + throw new PhabricatorCustomFieldImplementationIncompleteException($this); 28 28 } 29 29 if (strpos($key, '.') !== false) { 30 30 /** ··· 176 176 } 177 177 178 178 public function renderLabelForCommitMessage() { 179 - throw new ReleephFieldSpecificationIncompleteException($this); 179 + throw new PhabricatorCustomFieldImplementationIncompleteException($this); 180 180 } 181 181 182 182 public function renderValueForCommitMessage() { 183 - throw new ReleephFieldSpecificationIncompleteException($this); 183 + throw new PhabricatorCustomFieldImplementationIncompleteException($this); 184 184 } 185 185 186 186 public function shouldAppearOnRevertMessage() { ··· 215 215 } 216 216 217 217 public function getMarkupText($field) { 218 - throw new ReleephFieldSpecificationIncompleteException($this); 218 + throw new PhabricatorCustomFieldImplementationIncompleteException($this); 219 219 } 220 220 221 221 final public function getMarkupEngineOutput() {
+2 -9
src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php
··· 20 20 abstract public function getDescriptionForLevel($level); 21 21 22 22 public function getStorageKey() { 23 - $class = get_class($this); 24 - throw new ReleephFieldSpecificationIncompleteException( 25 - $this, 26 - "You must implement getStorageKey() for children of {$class}!"); 23 + throw new PhabricatorCustomFieldImplementationIncompleteException($this); 27 24 } 28 25 29 26 public function renderValueForHeaderView() { ··· 34 31 $control_name = $this->getRequiredStorageKey(); 35 32 $all_levels = $this->getLevels(); 36 33 37 - $level = $request->getStr($control_name); 38 - if (!$level) { 39 - $level = $this->getValue(); 40 - } 41 - 34 + $level = $this->getValue(); 42 35 if (!$level) { 43 36 $level = $this->getDefaultLevel(); 44 37 }