@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.

Remove "final" from "private" methods in Phabricator

Summary:
Ref T13588. This has never been meaningful, but a "final private" method is specifically forbidden in PHP8.

Remove meaningless "final" from these methods, per new lint checks.

Test Plan: Ran `arc lint --everything` to identify affected methods, then `... | xargs -n1 arc lint --apply-patches`.

Maniphest Tasks: T13588

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

+19 -19
+2 -2
src/applications/base/PhabricatorApplication.php
··· 490 490 return array(); 491 491 } 492 492 493 - final private function getCustomPolicySetting($capability) { 493 + private function getCustomPolicySetting($capability) { 494 494 if (!$this->isCapabilityEditable($capability)) { 495 495 return null; 496 496 } ··· 516 516 } 517 517 518 518 519 - final private function getCustomCapabilitySpecification($capability) { 519 + private function getCustomCapabilitySpecification($capability) { 520 520 $custom = $this->getCustomCapabilities(); 521 521 if (!isset($custom[$capability])) { 522 522 throw new Exception(pht("Unknown capability '%s'!", $capability));
+1 -1
src/applications/differential/storage/DifferentialHunk.php
··· 203 203 return implode('', $this->makeContent($include)); 204 204 } 205 205 206 - final private function makeContent($include) { 206 + private function makeContent($include) { 207 207 $lines = $this->getSplitLines(); 208 208 $results = array(); 209 209
+4 -4
src/applications/diffusion/request/DiffusionRequest.php
··· 125 125 * 126 126 * @task new 127 127 */ 128 - final private function __construct() { 128 + private function __construct() { 129 129 // <private> 130 130 } 131 131 ··· 138 138 * @return DiffusionRequest New request object. 139 139 * @task new 140 140 */ 141 - final private static function newFromIdentifier( 141 + private static function newFromIdentifier( 142 142 $identifier, 143 143 PhabricatorUser $viewer, 144 144 $need_edit = false) { ··· 174 174 * @return DiffusionRequest New request object. 175 175 * @task new 176 176 */ 177 - final private static function newFromRepository( 177 + private static function newFromRepository( 178 178 PhabricatorRepository $repository) { 179 179 180 180 $map = array( ··· 205 205 * @return void 206 206 * @task new 207 207 */ 208 - final private function initializeFromDictionary(array $data) { 208 + private function initializeFromDictionary(array $data) { 209 209 $blob = idx($data, 'blob'); 210 210 if (strlen($blob)) { 211 211 $blob = self::parseRequestBlob($blob, $this->supportsBranches());
+4 -4
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 1389 1389 return $xactions; 1390 1390 } 1391 1391 1392 - final private function queuePublishing() { 1392 + private function queuePublishing() { 1393 1393 $object = $this->publishableObject; 1394 1394 $xactions = $this->publishableTransactions; 1395 1395 ··· 4207 4207 * @return dict<string, wild> Serializable editor state. 4208 4208 * @task workers 4209 4209 */ 4210 - final private function getWorkerState() { 4210 + private function getWorkerState() { 4211 4211 $state = array(); 4212 4212 foreach ($this->getAutomaticStateProperties() as $property) { 4213 4213 $state[$property] = $this->$property; ··· 4336 4336 * @return map<string, wild> Map of encoded values. 4337 4337 * @task workers 4338 4338 */ 4339 - final private function encodeStateForStorage( 4339 + private function encodeStateForStorage( 4340 4340 array $state, 4341 4341 array $encodings) { 4342 4342 ··· 4382 4382 * @return map<string, wild> Map of decoded values. 4383 4383 * @task workers 4384 4384 */ 4385 - final private function decodeStateFromStorage( 4385 + private function decodeStateFromStorage( 4386 4386 array $state, 4387 4387 array $encodings) { 4388 4388
+6 -6
src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php
··· 135 135 ); 136 136 } 137 137 138 - final private function getExternalCursorStringForResult($object) { 138 + private function getExternalCursorStringForResult($object) { 139 139 $cursor = $this->newExternalCursorStringForResult($object); 140 140 141 141 if (!is_string($cursor)) { ··· 154 154 return $this->externalCursorString; 155 155 } 156 156 157 - final private function setExternalCursorString($external_cursor) { 157 + private function setExternalCursorString($external_cursor) { 158 158 $this->externalCursorString = $external_cursor; 159 159 return $this; 160 160 } ··· 168 168 return $this; 169 169 } 170 170 171 - final private function getInternalCursorObject() { 171 + private function getInternalCursorObject() { 172 172 return $this->internalCursorObject; 173 173 } 174 174 175 - final private function setInternalCursorObject( 175 + private function setInternalCursorObject( 176 176 PhabricatorQueryCursor $cursor) { 177 177 $this->internalCursorObject = $cursor; 178 178 return $this; 179 179 } 180 180 181 - final private function getInternalCursorFromExternalCursor( 181 + private function getInternalCursorFromExternalCursor( 182 182 $cursor_string) { 183 183 184 184 $cursor_object = $this->newInternalCursorFromExternalCursor($cursor_string); ··· 196 196 return $cursor_object; 197 197 } 198 198 199 - final private function getPagingMapFromCursorObject( 199 + private function getPagingMapFromCursorObject( 200 200 PhabricatorQueryCursor $cursor, 201 201 array $keys) { 202 202
+2 -2
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
··· 156 156 return $err; 157 157 } 158 158 159 - final private function doAdjustSchemata( 159 + private function doAdjustSchemata( 160 160 PhabricatorStorageManagementAPI $api, 161 161 $unsafe) { 162 162 ··· 913 913 } 914 914 } 915 915 916 - final private function doUpgradeSchemata( 916 + private function doUpgradeSchemata( 917 917 array $apis, 918 918 $apply_only, 919 919 $no_quickstart,