1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface

Summary:
Depends on D19919. Ref T11351. This method appeared in D8802 (note that "get...Object" was renamed to "get...Transaction" there, so this method was actually "new" even though a method of the same name had existed before).

The goal at the time was to let Harbormaster post build results to Diffs and have them end up on Revisions, but this eventually got a better implementation (see below) where the Harbormaster-specific code can just specify a "publishable object" where build results should go.

The new `get...Object` semantics ultimately broke some stuff, and the actual implementation in Differential was removed in D10911, so this method hasn't really served a purpose since December 2014. I think that broke the Harbormaster thing by accident and we just lived with it for a bit, then Harbormaster got some more work and D17139 introduced "publishable" objects which was a better approach. This was later refined by D19281.

So: the original problem (sending build results to the right place) has a good solution now, this method hasn't done anything for 4 years, and it was probably a bad idea in the first place since it's pretty weird/surprising/fragile.

Note that `Comment` objects still have an unrelated method with the same name. In that case, the method ties the `Comment` storage object to the related `Transaction` storage object.

Test Plan: Grepped for `getApplicationTransactionObject`, verified that all remaining callsites are related to `Comment` objects.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T11351

Differential Revision: https://secure.phabricator.com/D19920
This commit is contained in:
epriestley 2018-12-20 10:41:01 -08:00
parent 937e88c399
commit 11cf8f05b1
81 changed files with 6 additions and 328 deletions

View file

@ -206,10 +206,6 @@ final class AlmanacBinding
return new AlmanacBindingEditor(); return new AlmanacBindingEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new AlmanacBindingTransaction(); return new AlmanacBindingTransaction();
} }

View file

@ -204,10 +204,6 @@ final class AlmanacDevice
return new AlmanacDeviceEditor(); return new AlmanacDeviceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new AlmanacDeviceTransaction(); return new AlmanacDeviceTransaction();
} }

View file

@ -168,10 +168,6 @@ final class AlmanacInterface
return new AlmanacInterfaceEditor(); return new AlmanacInterfaceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new AlmanacInterfaceTransaction(); return new AlmanacInterfaceTransaction();
} }

View file

@ -191,10 +191,6 @@ final class AlmanacNamespace
return new AlmanacNamespaceEditor(); return new AlmanacNamespaceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new AlmanacNamespaceTransaction(); return new AlmanacNamespaceTransaction();
} }

View file

@ -61,10 +61,6 @@ final class AlmanacNetwork
return new AlmanacNetworkEditor(); return new AlmanacNetworkEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new AlmanacNetworkTransaction(); return new AlmanacNetworkTransaction();
} }

View file

@ -226,10 +226,6 @@ final class AlmanacService
return new AlmanacServiceEditor(); return new AlmanacServiceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new AlmanacServiceTransaction(); return new AlmanacServiceTransaction();
} }

View file

@ -217,10 +217,6 @@ final class PhabricatorAuthPassword
return new PhabricatorAuthPasswordEditor(); return new PhabricatorAuthPasswordEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorAuthPasswordTransaction(); return new PhabricatorAuthPasswordTransaction();
} }

View file

@ -91,10 +91,6 @@ final class PhabricatorAuthProviderConfig
return new PhabricatorAuthProviderConfigEditor(); return new PhabricatorAuthProviderConfigEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorAuthProviderConfigTransaction(); return new PhabricatorAuthProviderConfigTransaction();
} }

View file

@ -159,10 +159,6 @@ final class PhabricatorAuthSSHKey
return new PhabricatorAuthSSHKeyEditor(); return new PhabricatorAuthSSHKeyEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorAuthSSHKeyTransaction(); return new PhabricatorAuthSSHKeyTransaction();
} }

View file

@ -125,10 +125,6 @@ final class PhabricatorBadgesBadge extends PhabricatorBadgesDAO
return new PhabricatorBadgesEditor(); return new PhabricatorBadgesEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorBadgesTransaction(); return new PhabricatorBadgesTransaction();
} }

View file

@ -649,10 +649,6 @@ abstract class PhabricatorApplication
return new PhabricatorApplicationEditor(); return new PhabricatorApplicationEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorApplicationApplicationTransaction(); return new PhabricatorApplicationApplicationTransaction();
} }

View file

@ -1311,10 +1311,6 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
return new PhabricatorCalendarEventEditor(); return new PhabricatorCalendarEventEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorCalendarEventTransaction(); return new PhabricatorCalendarEventTransaction();
} }

View file

@ -166,10 +166,6 @@ final class PhabricatorCalendarExport extends PhabricatorCalendarDAO
return new PhabricatorCalendarExportEditor(); return new PhabricatorCalendarExportEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorCalendarExportTransaction(); return new PhabricatorCalendarExportTransaction();
} }

View file

@ -140,10 +140,6 @@ final class PhabricatorCalendarImport
return new PhabricatorCalendarImportEditor(); return new PhabricatorCalendarImportEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorCalendarImportTransaction(); return new PhabricatorCalendarImportTransaction();
} }

View file

@ -61,10 +61,6 @@ final class PhabricatorConfigEntry
return new PhabricatorConfigEditor(); return new PhabricatorConfigEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorConfigTransaction(); return new PhabricatorConfigTransaction();
} }

View file

@ -311,10 +311,6 @@ final class ConpherenceThread extends ConpherenceDAO
return new ConpherenceEditor(); return new ConpherenceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new ConpherenceTransaction(); return new ConpherenceTransaction();
} }

View file

@ -95,10 +95,6 @@ final class PhabricatorCountdown extends PhabricatorCountdownDAO
return new PhabricatorCountdownEditor(); return new PhabricatorCountdownEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorCountdownTransaction(); return new PhabricatorCountdownTransaction();
} }

View file

@ -130,10 +130,6 @@ final class PhabricatorDashboard extends PhabricatorDashboardDAO
return new PhabricatorDashboardTransactionEditor(); return new PhabricatorDashboardTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorDashboardTransaction(); return new PhabricatorDashboardTransaction();
} }

View file

@ -113,10 +113,6 @@ final class PhabricatorDashboardPanel
return new PhabricatorDashboardPanelTransactionEditor(); return new PhabricatorDashboardPanelTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorDashboardPanelTransaction(); return new PhabricatorDashboardPanelTransaction();
} }

View file

@ -699,10 +699,6 @@ final class DifferentialDiff
return new DifferentialDiffEditor(); return new DifferentialDiffEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new DifferentialDiffTransaction(); return new DifferentialDiffTransaction();
} }

View file

@ -991,10 +991,6 @@ final class DifferentialRevision extends DifferentialDAO
return new DifferentialTransactionEditor(); return new DifferentialTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new DifferentialTransaction(); return new DifferentialTransaction();
} }

View file

@ -143,10 +143,6 @@ final class DivinerLiveBook extends DivinerDAO
return new DivinerLiveBookEditor(); return new DivinerLiveBookEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new DivinerLiveBookTransaction(); return new DivinerLiveBookTransaction();
} }

View file

@ -295,10 +295,6 @@ final class DrydockBlueprint extends DrydockDAO
return new DrydockBlueprintEditor(); return new DrydockBlueprintEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new DrydockBlueprintTransaction(); return new DrydockBlueprintTransaction();
} }

View file

@ -1544,10 +1544,6 @@ final class PhabricatorFile extends PhabricatorFileDAO
return new PhabricatorFileEditor(); return new PhabricatorFileEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorFileTransaction(); return new PhabricatorFileTransaction();
} }

View file

@ -110,10 +110,6 @@ final class FundBacker extends FundDAO
return new FundBackerEditor(); return new FundBackerEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new FundBackerTransaction(); return new FundBackerTransaction();
} }

View file

@ -160,10 +160,6 @@ final class FundInitiative extends FundDAO
return new FundInitiativeEditor(); return new FundInitiativeEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new FundInitiativeTransaction(); return new FundInitiativeTransaction();
} }

View file

@ -96,9 +96,7 @@ abstract class HarbormasterBuildableEngine
$publishable = $this->getPublishableObject(); $publishable = $this->getPublishableObject();
$editor = $this->newEditor(); $editor = $this->newEditor();
$editor->applyTransactions( $editor->applyTransactions($publishable, $xactions);
$publishable->getApplicationTransactionObject(),
$xactions);
} }
public function getAuthorIdentity() { public function getAuthorIdentity() {

View file

@ -283,10 +283,6 @@ final class HarbormasterBuildable
return new HarbormasterBuildableTransactionEditor(); return new HarbormasterBuildableTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new HarbormasterBuildableTransaction(); return new HarbormasterBuildableTransaction();
} }

View file

@ -393,10 +393,6 @@ final class HarbormasterBuild extends HarbormasterDAO
return new HarbormasterBuildTransactionEditor(); return new HarbormasterBuildTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new HarbormasterBuildTransaction(); return new HarbormasterBuildTransaction();
} }

View file

@ -136,10 +136,6 @@ final class HarbormasterBuildPlan extends HarbormasterDAO
return new HarbormasterBuildPlanEditor(); return new HarbormasterBuildPlanEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new HarbormasterBuildPlanTransaction(); return new HarbormasterBuildPlanTransaction();
} }

View file

@ -121,10 +121,6 @@ final class HarbormasterBuildStep extends HarbormasterDAO
return new HarbormasterBuildStepEditor(); return new HarbormasterBuildStepEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new HarbormasterBuildStepTransaction(); return new HarbormasterBuildStepTransaction();
} }

View file

@ -318,10 +318,6 @@ final class HeraldRule extends HeraldDAO
return new HeraldRuleEditor(); return new HeraldRuleEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new HeraldRuleTransaction(); return new HeraldRuleTransaction();
} }

View file

@ -200,10 +200,6 @@ final class HeraldWebhook
return new HeraldWebhookEditor(); return new HeraldWebhookEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new HeraldWebhookTransaction(); return new HeraldWebhookTransaction();
} }

View file

@ -209,10 +209,6 @@ final class LegalpadDocument extends LegalpadDAO
return new LegalpadDocumentEditor(); return new LegalpadDocumentEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new LegalpadTransaction(); return new LegalpadTransaction();
} }

View file

@ -98,10 +98,6 @@ final class PhabricatorFileImageMacro extends PhabricatorFileDAO
return new PhabricatorMacroEditor(); return new PhabricatorMacroEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorMacroTransaction(); return new PhabricatorMacroTransaction();
} }

View file

@ -452,10 +452,6 @@ final class ManiphestTask extends ManiphestDAO
return new ManiphestTransactionEditor(); return new ManiphestTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new ManiphestTransaction(); return new ManiphestTransaction();
} }

View file

@ -123,10 +123,6 @@ final class PhabricatorMetaMTAApplicationEmail
return new PhabricatorMetaMTAApplicationEmailEditor(); return new PhabricatorMetaMTAApplicationEmailEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorMetaMTAApplicationEmailTransaction(); return new PhabricatorMetaMTAApplicationEmailTransaction();
} }

View file

@ -193,10 +193,6 @@ final class NuanceItem
return new NuanceItemEditor(); return new NuanceItemEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new NuanceItemTransaction(); return new NuanceItemTransaction();
} }

View file

@ -79,10 +79,6 @@ final class NuanceQueue
return new NuanceQueueEditor(); return new NuanceQueueEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new NuanceQueueTransaction(); return new NuanceQueueTransaction();
} }

View file

@ -99,10 +99,6 @@ final class NuanceSource extends NuanceDAO
return new NuanceSourceEditor(); return new NuanceSourceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new NuanceSourceTransaction(); return new NuanceSourceTransaction();
} }

View file

@ -91,10 +91,6 @@ final class PhabricatorOAuthServerClient
return new PhabricatorOAuthServerEditor(); return new PhabricatorOAuthServerEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorOAuthServerTransaction(); return new PhabricatorOAuthServerTransaction();
} }

View file

@ -607,10 +607,6 @@ final class PhabricatorOwnersPackage
return new PhabricatorOwnersPackageTransactionEditor(); return new PhabricatorOwnersPackageTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorOwnersPackageTransaction(); return new PhabricatorOwnersPackageTransaction();
} }

View file

@ -189,10 +189,6 @@ final class PhabricatorPackagesPackage
return new PhabricatorPackagesPackageEditor(); return new PhabricatorPackagesPackageEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorPackagesPackageTransaction(); return new PhabricatorPackagesPackageTransaction();
} }

View file

@ -165,10 +165,6 @@ final class PhabricatorPackagesPublisher
return new PhabricatorPackagesPublisherEditor(); return new PhabricatorPackagesPublisherEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorPackagesPublisherTransaction(); return new PhabricatorPackagesPublisherTransaction();
} }

View file

@ -156,10 +156,6 @@ final class PhabricatorPackagesVersion
return new PhabricatorPackagesVersionEditor(); return new PhabricatorPackagesVersionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorPackagesVersionTransaction(); return new PhabricatorPackagesVersionTransaction();
} }

View file

@ -117,10 +117,6 @@ final class PassphraseCredential extends PassphraseDAO
return new PassphraseCredentialTransactionEditor(); return new PassphraseCredentialTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PassphraseCredentialTransaction(); return new PassphraseCredentialTransaction();
} }

View file

@ -219,10 +219,6 @@ final class PhabricatorPaste extends PhabricatorPasteDAO
return new PhabricatorPasteEditor(); return new PhabricatorPasteEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorPasteTransaction(); return new PhabricatorPasteTransaction();
} }

View file

@ -1371,10 +1371,6 @@ final class PhabricatorUser
return new PhabricatorUserTransactionEditor(); return new PhabricatorUserTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorUserTransaction(); return new PhabricatorUserTransaction();
} }

View file

@ -331,10 +331,6 @@ final class PhameBlog extends PhameDAO
return new PhameBlogEditor(); return new PhameBlogEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhameBlogTransaction(); return new PhameBlogTransaction();
} }

View file

@ -279,10 +279,6 @@ final class PhamePost extends PhameDAO
return new PhamePostEditor(); return new PhamePostEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhamePostTransaction(); return new PhamePostTransaction();
} }

View file

@ -41,10 +41,6 @@ final class PhluxVariable extends PhluxDAO
return new PhluxVariableEditor(); return new PhluxVariableEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhluxTransaction(); return new PhluxTransaction();
} }

View file

@ -221,10 +221,6 @@ final class PholioMock extends PholioDAO
return new PholioMockEditor(); return new PholioMockEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PholioTransaction(); return new PholioTransaction();
} }

View file

@ -105,10 +105,6 @@ final class PhortuneAccount extends PhortuneDAO
return new PhortuneAccountEditor(); return new PhortuneAccountEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhortuneAccountTransaction(); return new PhortuneAccountTransaction();
} }

View file

@ -636,10 +636,6 @@ final class PhortuneCart extends PhortuneDAO
return new PhortuneCartEditor(); return new PhortuneCartEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhortuneCartTransaction(); return new PhortuneCartTransaction();
} }

View file

@ -78,10 +78,6 @@ final class PhortuneMerchant extends PhortuneDAO
return new PhortuneMerchantEditor(); return new PhortuneMerchantEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhortuneMerchantTransaction(); return new PhortuneMerchantTransaction();
} }

View file

@ -106,10 +106,6 @@ final class PhortunePaymentProviderConfig extends PhortuneDAO
return new PhortunePaymentProviderConfigEditor(); return new PhortunePaymentProviderConfigEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhortunePaymentProviderConfigTransaction(); return new PhortunePaymentProviderConfigTransaction();
} }

View file

@ -223,10 +223,6 @@ final class PhrictionDocument extends PhrictionDAO
return new PhrictionTransactionEditor(); return new PhrictionTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhrictionTransaction(); return new PhrictionTransaction();
} }

View file

@ -157,10 +157,6 @@ final class PhabricatorPhurlURL extends PhabricatorPhurlDAO
return new PhabricatorPhurlURLEditor(); return new PhabricatorPhurlURLEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorPhurlURLTransaction(); return new PhabricatorPhurlURLTransaction();
} }

View file

@ -117,10 +117,6 @@ final class PonderAnswer extends PonderDAO
return new PonderAnswerEditor(); return new PonderAnswerEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PonderAnswerTransaction(); return new PonderAnswerTransaction();
} }

View file

@ -145,10 +145,6 @@ final class PonderQuestion extends PonderDAO
return new PonderQuestionEditor(); return new PonderQuestionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PonderQuestionTransaction(); return new PonderQuestionTransaction();
} }

View file

@ -695,10 +695,6 @@ final class PhabricatorProject extends PhabricatorProjectDAO
return new PhabricatorProjectTransactionEditor(); return new PhabricatorProjectTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorProjectTransaction(); return new PhabricatorProjectTransaction();
} }

View file

@ -234,10 +234,6 @@ final class PhabricatorProjectColumn
return new PhabricatorProjectColumnTransactionEditor(); return new PhabricatorProjectColumnTransactionEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorProjectColumnTransaction(); return new PhabricatorProjectColumnTransaction();
} }

View file

@ -158,10 +158,6 @@ final class ReleephBranch extends ReleephDAO
return new ReleephBranchEditor(); return new ReleephBranchEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new ReleephBranchTransaction(); return new ReleephBranchTransaction();
} }

View file

@ -119,10 +119,6 @@ final class ReleephProject extends ReleephDAO
return new ReleephProductEditor(); return new ReleephProductEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new ReleephProductTransaction(); return new ReleephProductTransaction();
} }

View file

@ -299,10 +299,6 @@ final class ReleephRequest extends ReleephDAO
return new ReleephRequestTransactionalEditor(); return new ReleephRequestTransactionalEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new ReleephRequestTransaction(); return new ReleephRequestTransaction();
} }

View file

@ -2613,10 +2613,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
return new PhabricatorRepositoryEditor(); return new PhabricatorRepositoryEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorRepositoryTransaction(); return new PhabricatorRepositoryTransaction();
} }

View file

@ -731,10 +731,6 @@ final class PhabricatorRepositoryCommit
return new PhabricatorAuditEditor(); return new PhabricatorAuditEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorAuditTransaction(); return new PhabricatorAuditTransaction();
} }

View file

@ -134,10 +134,6 @@ final class PhabricatorRepositoryIdentity
return new DiffusionRepositoryIdentityEditor(); return new DiffusionRepositoryIdentityEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorRepositoryIdentityTransaction(); return new PhabricatorRepositoryIdentityTransaction();
} }

View file

@ -605,10 +605,6 @@ final class PhabricatorRepositoryURI
return new DiffusionURIEditor(); return new DiffusionURIEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorRepositoryURITransaction(); return new PhabricatorRepositoryURITransaction();
} }

View file

@ -265,10 +265,6 @@ final class PhabricatorProfileMenuItemConfiguration
return new PhabricatorProfileMenuEditor(); return new PhabricatorProfileMenuEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorProfileMenuItemConfigurationTransaction(); return new PhabricatorProfileMenuItemConfigurationTransaction();
} }

View file

@ -245,10 +245,6 @@ final class PhabricatorUserPreferences
return new PhabricatorUserPreferencesEditor(); return new PhabricatorUserPreferencesEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorUserPreferencesTransaction(); return new PhabricatorUserPreferencesTransaction();
} }

View file

@ -131,10 +131,6 @@ final class PhabricatorSlowvotePoll extends PhabricatorSlowvoteDAO
return new PhabricatorSlowvoteEditor(); return new PhabricatorSlowvoteEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorSlowvoteTransaction(); return new PhabricatorSlowvoteTransaction();
} }

View file

@ -91,10 +91,6 @@ final class PhabricatorSpacesNamespace
return new PhabricatorSpacesNamespaceEditor(); return new PhabricatorSpacesNamespaceEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorSpacesNamespaceTransaction(); return new PhabricatorSpacesNamespaceTransaction();
} }

View file

@ -77,9 +77,7 @@ final class PhabricatorSubscriptionsEditController
->setContinueOnMissingFields(true) ->setContinueOnMissingFields(true)
->setContentSourceFromRequest($request); ->setContentSourceFromRequest($request);
$editor->applyTransactions( $editor->applyTransactions($object, array($xaction));
$object->getApplicationTransactionObject(),
array($xaction));
} else { } else {
// TODO: Eventually, get rid of this once everything implements // TODO: Eventually, get rid of this once everything implements

View file

@ -55,9 +55,7 @@ final class PhabricatorSubscriptionsMuteController
->setContinueOnMissingFields(true) ->setContinueOnMissingFields(true)
->setContentSourceFromRequest($request); ->setContentSourceFromRequest($request);
$editor->applyTransactions( $editor->applyTransactions($object, array($xaction));
$object->getApplicationTransactionObject(),
array($xaction));
return id(new AphrontReloadResponse())->setURI($object_uri); return id(new AphrontReloadResponse())->setURI($object_uri);
} }

View file

@ -166,9 +166,7 @@ final class PhabricatorTokenGivenEditor
->setContinueOnNoEffect(true) ->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true); ->setContinueOnMissingFields(true);
$editor->applyTransactions( $editor->applyTransactions($object, $xactions);
$object->getApplicationTransactionObject(),
$xactions);
} }
} }

View file

@ -3766,7 +3766,6 @@ abstract class PhabricatorApplicationTransactionEditor
$editor = $node->getApplicationTransactionEditor(); $editor = $node->getApplicationTransactionEditor();
$template = $node->getApplicationTransactionTemplate(); $template = $node->getApplicationTransactionTemplate();
$target = $node->getApplicationTransactionObject();
if (isset($add[$node->getPHID()])) { if (isset($add[$node->getPHID()])) {
$edge_edit_type = '+'; $edge_edit_type = '+';
@ -3792,7 +3791,7 @@ abstract class PhabricatorApplicationTransactionEditor
->setActingAsPHID($this->getActingAsPHID()) ->setActingAsPHID($this->getActingAsPHID())
->setContentSource($this->getContentSource()); ->setContentSource($this->getContentSource());
$editor->applyTransactions($target, array($template)); $editor->applyTransactions($node, array($template));
} }
} }

View file

@ -17,17 +17,6 @@ interface PhabricatorApplicationTransactionInterface {
public function getApplicationTransactionEditor(); public function getApplicationTransactionEditor();
/**
* Return the object to apply transactions to. Normally this is the current
* object (that is, `$this`), but in some cases transactions may apply to
* a different object: for example, @{class:DifferentialDiff} applies
* transactions to the associated @{class:DifferentialRevision}.
*
* @return PhabricatorLiskDAO Object to apply transactions to.
*/
public function getApplicationTransactionObject();
/** /**
* Return a template transaction for this object. * Return a template transaction for this object.
* *
@ -47,10 +36,6 @@ interface PhabricatorApplicationTransactionInterface {
return new <<<???>>>Editor(); return new <<<???>>>Editor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new <<<???>>>Transaction(); return new <<<???>>>Transaction();
} }

View file

@ -107,11 +107,9 @@ abstract class PhabricatorApplicationTransactionReplyHandler
->attachComment($comment); ->attachComment($comment);
} }
$target = $object->getApplicationTransactionObject();
$this->newEditor($mail) $this->newEditor($mail)
->setContinueOnNoEffect(true) ->setContinueOnNoEffect(true)
->applyTransactions($target, $xactions); ->applyTransactions($object, $xactions);
} }
private function processMailCommands( private function processMailCommands(

View file

@ -339,10 +339,6 @@ final class PhabricatorEditEngineConfiguration
return new PhabricatorEditEngineConfigurationEditor(); return new PhabricatorEditEngineConfigurationEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorEditEngineConfigurationTransaction(); return new PhabricatorEditEngineConfigurationTransaction();
} }

View file

@ -233,10 +233,6 @@ final class PhabricatorWorkerBulkJob
return new PhabricatorWorkerBulkJobEditor(); return new PhabricatorWorkerBulkJobEditor();
} }
public function getApplicationTransactionObject() {
return $this;
}
public function getApplicationTransactionTemplate() { public function getApplicationTransactionTemplate() {
return new PhabricatorWorkerBulkJobTransaction(); return new PhabricatorWorkerBulkJobTransaction();
} }