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

Fix wrong argument count in numerous calls' signatures

Summary:
Fix incorrect method/function argument counts which are trivial:
* /src/applications/config/controller/PhabricatorConfigController.php:13 Method PhabricatorFile::getBestURI() invoked with 1 parameter, 0 required.
* /src/applications/conpherence/controller/ConpherenceListController.php:135 Method ConpherenceController::buildHeaderPaneContent() invoked with 2 parameters, 1 required.
* /src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php:74 Method PhutilContextFreeGrammar::generate() invoked with 2 parameters, 0 required.
* /src/applications/differential/storage/DifferentialChangeset.php:589 Method LiskDAO::makeEphemeral() invoked with 1 parameter, 0 required.
* /src/applications/diffusion/management/DiffusionRepositorySubversionManagementPanel.php:59 Method DiffusionRepositoryManagementPanel::newCurtainView() invoked with 1 parameter, 0 required.
* /src/applications/diffusion/xaction/DiffusionCommitAuditTransaction.php:123 Method PhabricatorRepositoryCommit::hasAuditAuthority() invoked with 3 parameters, 2 required.
* /src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php:165 Method HarbormasterBuildArtifact::releaseArtifact() invoked with 1 parameter, 0 required.
* /src/applications/repository/engine/PhabricatorRepositoryPullEngine.php:457 Method PhabricatorRepository::getFetchRules() invoked with 1 parameter, 0 required.
* /src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php:67 Method PhabricatorConpherenceProfileMenuItem::getConpherence() invoked with 1 parameter, 0 required.
* /src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php:104 Method PhabricatorConpherenceProfileMenuItem::getConpherence() invoked with 1 parameter, 0 required.
* /src/applications/search/query/PhabricatorSearchDocumentQuery.php:52 Static method PhabricatorSearchService::newResultSet() invoked with 2 parameters, 1 required.
* /src/infrastructure/editor/PhabricatorEditorURIEngine.php:71 Method PhabricatorEditorURIEngine::getURITokensForRepository() invoked with 1 parameter, 0 required.
* /src/infrastructure/editor/PhabricatorEditorURIEngine.php:84 Method PhabricatorEditorURIEngine::getURITokensForRepository() invoked with 1 parameter, 0 required.

Test Plan:
Look up function/method definitions, compare with their calls. Run static code analysis.

Also, test the revision generator and it finally works as intended with 10-20 random description lines (not just 1):

./bin/lipsum generate revisions

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

+13 -15
+1 -1
src/applications/config/controller/PhabricatorConfigController.php
··· 10 10 $viewer = $this->getViewer(); 11 11 12 12 $file = PhabricatorFile::loadBuiltin($viewer, 'projects/v3/manage.png'); 13 - $image = $file->getBestURI($file); 13 + $image = $file->getBestURI(); 14 14 $header = id(new PHUIHeaderView()) 15 15 ->setHeader($text) 16 16 ->setProfileHeader(true)
+1 -2
src/applications/conpherence/controller/ConpherenceListController.php
··· 133 133 ->setObject($conpherence) 134 134 ->execute(); 135 135 $layout->setHeader($this->buildHeaderPaneContent( 136 - $conpherence, 137 - $policy_objects)); 136 + $conpherence)); 138 137 $response = $this->newPage() 139 138 ->setTitle($title) 140 139 ->appendChild($layout);
+1 -1
src/applications/differential/lipsum/PhabricatorDifferentialRevisionTestDataGenerator.php
··· 72 72 73 73 public function generateDescription() { 74 74 return id(new PhutilLipsumContextFreeGrammar()) 75 - ->generate(10, 20); 75 + ->generateSeveral(rand(10, 20), "\n"); 76 76 } 77 77 78 78 public function generateTitle() {
+1 -1
src/applications/differential/storage/DifferentialChangeset.php
··· 587 587 $right_data); 588 588 589 589 $comparison = id(new self()) 590 - ->makeEphemeral(true) 590 + ->makeEphemeral() 591 591 ->attachDiff($left->getDiff()) 592 592 ->setOldFile($left->getFilename()) 593 593 ->setFilename($file_name);
+1 -1
src/applications/diffusion/management/DiffusionRepositorySubversionManagementPanel.php
··· 56 56 ->setDisabled(!$can_edit) 57 57 ->setWorkflow(!$can_edit)); 58 58 59 - return $this->newCurtainView($action_list) 59 + return $this->newCurtainView() 60 60 ->setActionList($action_list); 61 61 } 62 62
+1 -2
src/applications/diffusion/xaction/DiffusionCommitAuditTransaction.php
··· 110 110 $status) { 111 111 112 112 $actor = $this->getActor(); 113 - $acting_phid = $this->getActingAsPHID(); 114 113 115 114 $audits = $commit->getAudits(); 116 115 $audits = mpull($audits, null, 'getAuditorPHID'); ··· 120 119 $with_authority = ($status != PhabricatorAuditRequestStatus::RESIGNED); 121 120 if ($with_authority) { 122 121 foreach ($audits as $audit) { 123 - if ($commit->hasAuditAuthority($actor, $audit, $acting_phid)) { 122 + if ($commit->hasAuditAuthority($actor, $audit)) { 124 123 $map[$audit->getAuditorPHID()] = $status; 125 124 } 126 125 }
+1 -1
src/applications/harbormaster/storage/build/HarbormasterBuildArtifact.php
··· 162 162 $viewer = $this->getViewer(); 163 163 164 164 $this->openTransaction(); 165 - $this->releaseArtifact($viewer); 165 + $this->releaseArtifact(); 166 166 $this->delete(); 167 167 $this->saveTransaction(); 168 168 }
+1 -1
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
··· 454 454 } 455 455 456 456 private function getGitRefRules(PhabricatorRepository $repository) { 457 - $ref_rules = $repository->getFetchRules($repository); 457 + $ref_rules = $repository->getFetchRules(); 458 458 459 459 if (!$ref_rules) { 460 460 $ref_rules = array(
+2 -2
src/applications/search/menuitem/PhabricatorConpherenceProfileMenuItem.php
··· 64 64 65 65 public function getDisplayName( 66 66 PhabricatorProfileMenuItemConfiguration $config) { 67 - $room = $this->getConpherence($config); 67 + $room = $this->getConpherence(); 68 68 if (!$room) { 69 69 return pht('(Restricted/Invalid Conpherence)'); 70 70 } ··· 101 101 protected function newMenuItemViewList( 102 102 PhabricatorProfileMenuItemConfiguration $config) { 103 103 $viewer = $this->getViewer(); 104 - $room = $this->getConpherence($config); 104 + $room = $this->getConpherence(); 105 105 if (!$room) { 106 106 return array(); 107 107 }
+1 -1
src/applications/search/query/PhabricatorSearchDocumentQuery.php
··· 49 49 ->setParameter('offset', $this->unfilteredOffset) 50 50 ->setParameter('limit', $this->getRawResultLimit()); 51 51 52 - $result_set = PhabricatorSearchService::newResultSet($query, $this); 52 + $result_set = PhabricatorSearchService::newResultSet($query); 53 53 $phids = $result_set->getPHIDs(); 54 54 55 55 $this->fulltextResultSet = $result_set;
+2 -2
src/infrastructure/editor/PhabricatorEditorURIEngine.php
··· 68 68 } 69 69 70 70 public function getURIForPath($path, $line) { 71 - $tokens = $this->getURITokensForRepository($path); 71 + $tokens = $this->getURITokensForRepository(); 72 72 73 73 $variables = array( 74 74 'f' => $this->escapeToken($path), ··· 81 81 } 82 82 83 83 public function getURITokensForPath($path) { 84 - $tokens = $this->getURITokensForRepository($path); 84 + $tokens = $this->getURITokensForRepository(); 85 85 86 86 $variables = array( 87 87 'f' => $this->escapeToken($path),