@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 all short array syntax with long array syntax

Summary: Apparently Phorge likes things this way. Cross-ref T16393, D26577#40179

Test Plan:
Read the code.

To be sure this catches all uses (and what I did to make it):

- Revert rP52c264672f509e4044fe3ac9f34894532f4db535 locally
- Run `arc lint --rev 52c264672f509e4044fe3ac9f34894532f4db535`
- See no PHP compatibility errors related to array syntax (there will be unrelated lint errors)

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16393

Differential Revision: https://we.phorge.it/D26579

Pppery d9e8d725 71500d2b

+17 -13
+1 -1
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 243 243 private function getOpenGraphProtocolMetadataValues($task) { 244 244 $viewer = $this->getViewer(); 245 245 246 - $v = []; 246 + $v = array(); 247 247 $v['og:site_name'] = PlatformSymbols::getPlatformServerName(); 248 248 $v['og:type'] = 'website'; 249 249 $v['og:url'] = PhabricatorEnv::getProductionURI($task->getURI());
+7 -3
src/applications/transactions/view/PhorgeApplicationMentionsListView.php
··· 23 23 $in_type = PhabricatorObjectMentionedByObjectEdgeType::EDGECONST; 24 24 $out_type = PhabricatorObjectMentionsObjectEdgeType::EDGECONST; 25 25 26 - $in_phids = $this->edgeQuery->getDestinationPHIDs([], [$in_type]); 27 - $out_phids = $this->edgeQuery->getDestinationPHIDs([], [$out_type]); 26 + $in_phids = $this->edgeQuery->getDestinationPHIDs( 27 + array(), 28 + array($in_type)); 29 + $out_phids = $this->edgeQuery->getDestinationPHIDs( 30 + array(), 31 + array($out_type)); 28 32 29 33 // Filter out any mentioned users from the list. These are not generally 30 34 // very interesting to show in a relationship summary since they usually ··· 77 81 78 82 private function getCompleteHandles( 79 83 PhabricatorHandleList $handles): PhabricatorHandleList { 80 - $phids = []; 84 + $phids = array(); 81 85 82 86 foreach ($handles as $phid => $handle) { 83 87 if (!$handle->isComplete()) {
+9 -9
support/php-parser/PhorgePHPParserExtractor.php
··· 29 29 private $classDecl = null; 30 30 private $classExtends = null; 31 31 private $methodDecl = null; 32 - private $paramVars = []; 32 + private $paramVars = array(); 33 33 private $filename = null; 34 - private $results = []; 35 - private $warnings = []; 36 - private $variableAssignments = []; 34 + private $results = array(); 35 + private $warnings = array(); 36 + private $variableAssignments = array(); 37 37 38 38 public function getWarnings() { 39 39 return $this->warnings; ··· 90 90 if (isset($this->variableAssignments[$name])) { 91 91 return $this->typeNode( 92 92 $this->variableAssignments[$name], 93 - $seen + [$name => true]); 93 + $seen + array($name => true)); 94 94 } 95 95 $known = static::$knownTypes; 96 96 if (isset($known[$this->classExtends])) { ··· 118 118 } 119 119 } else if ($node instanceof PhpParser\Node\Stmt\ClassMethod) { 120 120 $this->methodDecl = $this->getName($node); 121 - $this->paramVars = []; 121 + $this->paramVars = array(); 122 122 $i = 0; 123 123 foreach ($node->params as $param) { 124 124 $name = $this->getName($param->var); ··· 138 138 } 139 139 } else if ($node instanceof PhpParser\Node\Expr\FuncCall) { 140 140 if ($this->getName($node) == 'pht') { 141 - $types = []; 141 + $types = array(); 142 142 $args = $node->args; 143 143 $first = array_shift($args); 144 144 try { ··· 171 171 $this->classExtends = null; 172 172 } else if ($node instanceof PhpParser\Node\Stmt\ClassMethod) { 173 173 $this->methodDecl = null; 174 - $this->paramVars = []; 175 - $this->variableAssignments = []; 174 + $this->paramVars = array(); 175 + $this->variableAssignments = array(); 176 176 } 177 177 } 178 178 }