mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Rename "DifferentialReviewer" to "DifferentialReviewerProxy"
Summary: Ref T10967. This makes room for a `DifferentialReviewer` object which can be a real storage table. Test Plan: Grepped for `DifferentialReviewer`, browsed Differential. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10967 Differential Revision: https://secure.phabricator.com/D17041
This commit is contained in:
parent
1e9a462baa
commit
77fa1ea738
8 changed files with 11 additions and 9 deletions
|
@ -495,9 +495,9 @@ phutil_register_library_map(array(
|
||||||
'DifferentialResponsibleViewerFunctionDatasource' => 'applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php',
|
'DifferentialResponsibleViewerFunctionDatasource' => 'applications/differential/typeahead/DifferentialResponsibleViewerFunctionDatasource.php',
|
||||||
'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php',
|
'DifferentialRevertPlanField' => 'applications/differential/customfield/DifferentialRevertPlanField.php',
|
||||||
'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php',
|
'DifferentialReviewedByField' => 'applications/differential/customfield/DifferentialReviewedByField.php',
|
||||||
'DifferentialReviewer' => 'applications/differential/storage/DifferentialReviewer.php',
|
|
||||||
'DifferentialReviewerDatasource' => 'applications/differential/typeahead/DifferentialReviewerDatasource.php',
|
'DifferentialReviewerDatasource' => 'applications/differential/typeahead/DifferentialReviewerDatasource.php',
|
||||||
'DifferentialReviewerForRevisionEdgeType' => 'applications/differential/edge/DifferentialReviewerForRevisionEdgeType.php',
|
'DifferentialReviewerForRevisionEdgeType' => 'applications/differential/edge/DifferentialReviewerForRevisionEdgeType.php',
|
||||||
|
'DifferentialReviewerProxy' => 'applications/differential/storage/DifferentialReviewerProxy.php',
|
||||||
'DifferentialReviewerStatus' => 'applications/differential/constants/DifferentialReviewerStatus.php',
|
'DifferentialReviewerStatus' => 'applications/differential/constants/DifferentialReviewerStatus.php',
|
||||||
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingReviewersHeraldAction.php',
|
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingReviewersHeraldAction.php',
|
||||||
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingSelfHeraldAction.php',
|
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'applications/differential/herald/DifferentialReviewersAddBlockingSelfHeraldAction.php',
|
||||||
|
@ -5125,9 +5125,9 @@ phutil_register_library_map(array(
|
||||||
'DifferentialResponsibleViewerFunctionDatasource' => 'PhabricatorTypeaheadDatasource',
|
'DifferentialResponsibleViewerFunctionDatasource' => 'PhabricatorTypeaheadDatasource',
|
||||||
'DifferentialRevertPlanField' => 'DifferentialStoredCustomField',
|
'DifferentialRevertPlanField' => 'DifferentialStoredCustomField',
|
||||||
'DifferentialReviewedByField' => 'DifferentialCoreCustomField',
|
'DifferentialReviewedByField' => 'DifferentialCoreCustomField',
|
||||||
'DifferentialReviewer' => 'Phobject',
|
|
||||||
'DifferentialReviewerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
'DifferentialReviewerDatasource' => 'PhabricatorTypeaheadCompositeDatasource',
|
||||||
'DifferentialReviewerForRevisionEdgeType' => 'PhabricatorEdgeType',
|
'DifferentialReviewerForRevisionEdgeType' => 'PhabricatorEdgeType',
|
||||||
|
'DifferentialReviewerProxy' => 'Phobject',
|
||||||
'DifferentialReviewerStatus' => 'Phobject',
|
'DifferentialReviewerStatus' => 'Phobject',
|
||||||
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'DifferentialReviewersHeraldAction',
|
'DifferentialReviewersAddBlockingReviewersHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||||
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'DifferentialReviewersHeraldAction',
|
'DifferentialReviewersAddBlockingSelfHeraldAction' => 'DifferentialReviewersHeraldAction',
|
||||||
|
|
|
@ -64,7 +64,7 @@ final class DifferentialCommentSaveController
|
||||||
if (isset($current_reviewers[$reviewer_phid])) {
|
if (isset($current_reviewers[$reviewer_phid])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$reviewer = new DifferentialReviewer(
|
$reviewer = new DifferentialReviewerProxy(
|
||||||
$reviewer_phid,
|
$reviewer_phid,
|
||||||
array(
|
array(
|
||||||
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
||||||
|
|
|
@ -84,7 +84,7 @@ final class DifferentialReviewersField
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($new_reviewers as $phid => $status) {
|
foreach ($new_reviewers as $phid => $status) {
|
||||||
$new_reviewers[$phid] = new DifferentialReviewer(
|
$new_reviewers[$phid] = new DifferentialReviewerProxy(
|
||||||
$phid,
|
$phid,
|
||||||
array(
|
array(
|
||||||
'status' => $status,
|
'status' => $status,
|
||||||
|
|
|
@ -474,7 +474,7 @@ final class DifferentialTransactionEditor
|
||||||
|
|
||||||
$owner_phid = $object->getAuthorPHID();
|
$owner_phid = $object->getAuthorPHID();
|
||||||
if ($owner_phid) {
|
if ($owner_phid) {
|
||||||
$reviewer = new DifferentialReviewer(
|
$reviewer = new DifferentialReviewerProxy(
|
||||||
$owner_phid,
|
$owner_phid,
|
||||||
array(
|
array(
|
||||||
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
'status' => DifferentialReviewerStatus::STATUS_ADDED,
|
||||||
|
|
|
@ -1008,7 +1008,9 @@ final class DifferentialRevisionQuery
|
||||||
$revision_edges = $edges[$revision->getPHID()][$edge_type];
|
$revision_edges = $edges[$revision->getPHID()][$edge_type];
|
||||||
$reviewers = array();
|
$reviewers = array();
|
||||||
foreach ($revision_edges as $reviewer_phid => $edge) {
|
foreach ($revision_edges as $reviewer_phid => $edge) {
|
||||||
$reviewer = new DifferentialReviewer($reviewer_phid, $edge['data']);
|
$reviewer = new DifferentialReviewerProxy(
|
||||||
|
$reviewer_phid,
|
||||||
|
$edge['data']);
|
||||||
|
|
||||||
if ($this->needReviewerAuthority) {
|
if ($this->needReviewerAuthority) {
|
||||||
if (!$viewer_phid) {
|
if (!$viewer_phid) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class DifferentialReviewer extends Phobject {
|
final class DifferentialReviewerProxy extends Phobject {
|
||||||
|
|
||||||
private $reviewerPHID;
|
private $reviewerPHID;
|
||||||
private $status;
|
private $status;
|
|
@ -403,7 +403,7 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
public function attachReviewerStatus(array $reviewers) {
|
public function attachReviewerStatus(array $reviewers) {
|
||||||
assert_instances_of($reviewers, 'DifferentialReviewer');
|
assert_instances_of($reviewers, 'DifferentialReviewerProxy');
|
||||||
|
|
||||||
$this->reviewerStatus = $reviewers;
|
$this->reviewerStatus = $reviewers;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -7,7 +7,7 @@ final class DifferentialReviewersView extends AphrontView {
|
||||||
private $diff;
|
private $diff;
|
||||||
|
|
||||||
public function setReviewers(array $reviewers) {
|
public function setReviewers(array $reviewers) {
|
||||||
assert_instances_of($reviewers, 'DifferentialReviewer');
|
assert_instances_of($reviewers, 'DifferentialReviewerProxy');
|
||||||
$this->reviewers = $reviewers;
|
$this->reviewers = $reviewers;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue