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

Fixed Project Generation

Summary: Ref T2903

Test Plan: Projects still generating with @epriestley's recommendations

Reviewers: epriestley, AnhNhan

Reviewed By: AnhNhan

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2903

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

authored by

deedydas and committed by
epriestley
0ca15f1f 89747c0e

+16 -30
+9
src/applications/lipsum/generator/PhabricatorTestDataGenerator.php
··· 16 16 } 17 17 } 18 18 19 + 20 + public function loadPhabrictorUserPHID() { 21 + return $this->loadOneRandom("PhabricatorUser")->getPHID(); 22 + } 23 + 24 + public function loadPhabrictorUser() { 25 + return $this->loadOneRandom("PhabricatorUser"); 26 + } 27 + 19 28 }
+1 -9
src/applications/maniphest/lipsum/PhabricatorManiphestTaskTestDataGenerator.php
··· 4 4 extends PhabricatorTestDataGenerator { 5 5 6 6 public function generate() { 7 - $authorPHID = $this->loadAuthorPHID(); 7 + $authorPHID = $this->loadPhabrictorUserPHID(); 8 8 $author = id(new PhabricatorUser()) 9 9 ->loadOneWhere('phid = %s', $authorPHID); 10 10 $task = id(new ManiphestTask()) ··· 75 75 $projects[] = $this->loadOneRandom("PhabricatorProject")->getPHID(); 76 76 } 77 77 return $projects; 78 - } 79 - 80 - private function loadPhabrictorUserPHID() { 81 - return $this->loadOneRandom("PhabricatorUser")->getPHID(); 82 - } 83 - 84 - public function loadAuthorPHID() { 85 - return $this->loadPhabrictorUserPHID(); 86 78 } 87 79 88 80 public function loadOwnerPHID() {
+1 -9
src/applications/paste/lipsum/PhabricatorPasteTestDataGenerator.php
··· 9 9 "PHP" => "php"); 10 10 11 11 public function generate() { 12 - $authorphid = $this->loadAuthorPHID(); 12 + $authorphid = $this->loadPhabrictorUserPHID(); 13 13 $language = $this->generateLanguage(); 14 14 $content = $this->generateContent($language); 15 15 $title = $this->generateTitle($language); ··· 43 43 } 44 44 } 45 45 return null; 46 - } 47 - 48 - private function loadPhabrictorUserPHID() { 49 - return id($this->loadOneRandom("PhabricatorUser"))->getPHID(); 50 - } 51 - 52 - public function loadAuthorPHID() { 53 - return $this->loadPhabrictorUserPHID(); 54 46 } 55 47 56 48 public function generateTitle($language = null) {
+5 -12
src/applications/project/lipsum/PhabricatorProjectTestDataGenerator.php
··· 7 7 8 8 public function generate() { 9 9 $title = $this->generateTitle(); 10 - $author = $this->loadAuthorPHID(); 10 + $author = $this->loadPhabrictorUser(); 11 + $authorPHID = $author->getPHID(); 11 12 $project = id(new PhabricatorProject()) 12 13 ->setName($title) 13 - ->setAuthorPHID($author); 14 + ->setAuthorPHID($authorPHID); 14 15 15 16 $this->addTransaction( 16 17 PhabricatorProjectTransactionType::TYPE_NAME, 17 18 $title); 18 19 $this->addTransaction( 19 20 PhabricatorProjectTransactionType::TYPE_MEMBERS, 20 - $this->loadMembersWithAuthor($author)); 21 + $this->loadMembersWithAuthor($authorPHID)); 21 22 $this->addTransaction( 22 23 PhabricatorProjectTransactionType::TYPE_STATUS, 23 24 $this->generateProjectStatus()); ··· 32 33 PhabricatorPolicies::POLICY_PUBLIC); 33 34 34 35 $editor = id(new PhabricatorProjectEditor($project)) 35 - ->setActor(id(new PhabricatorUser()) 36 - ->loadOneWhere('phid = %s', $author)) 36 + ->setActor($author) 37 37 ->applyTransactions($this->xactions); 38 38 39 39 $profile = id(new PhabricatorProjectProfile()) ··· 50 50 ->setNewValue($value); 51 51 } 52 52 53 - private function loadPhabrictorUserPHID() { 54 - return $this->loadOneRandom("PhabricatorUser")->getPHID(); 55 - } 56 - 57 - public function loadAuthorPHID() { 58 - return $this->loadPhabrictorUserPHID(); 59 - } 60 53 61 54 public function loadMembersWithAuthor($author) { 62 55 $members = array($author);