Page MenuHomePhabricator

Prepare TransactionCommentQuery for extension
ClosedPublic

Authored by epriestley on Mar 9 2015, 7:18 PM.
Tags
None
Referenced Files
F13084420: D12026.diff
Wed, Apr 24, 10:59 PM
Unknown Object (File)
Tue, Apr 23, 10:49 AM
Unknown Object (File)
Mon, Apr 22, 8:28 PM
Unknown Object (File)
Wed, Apr 17, 2:31 PM
Unknown Object (File)
Tue, Apr 16, 8:09 PM
Unknown Object (File)
Tue, Apr 16, 8:09 PM
Unknown Object (File)
Tue, Apr 16, 7:46 PM
Unknown Object (File)
Tue, Apr 16, 6:23 PM
Subscribers

Details

Summary

Ref T2009. Ref T1460. The way Diffusion and Differential load inlines is horrible garbage right now:

  • Differential does an ad-hoc query to get the PHIDs, then does a real load to policy check.
  • Diffusion completely fakes things. In practice this is not a policy violation, but it's dangerous.

Make TransactionCommentQuery extensible so we can subclass it and get the query building correctly in the right Query layer.

Specifically, the Diffusion and Differential subclasses of this Query will add appropriate withX() methods to let us express the query in SQL.

Test Plan

Loaded, previewed, edited, and submitted inlines in Differential and Diffusion

Diff Detail

Repository
rP Phabricator
Branch
uni34
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/differential/query/DifferentialTransactionQuery.php:14XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 4819
Build 4835: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Prepare TransactionCommentQuery for extension.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
src/applications/transactions/query/PhabricatorApplicationTransactionTemplatedCommentQuery.php
3–4

I split out this concrete subclass because I didn't want nonsense like this to work:

$differential_query = new DifferentialCommentQuery();
$differential_query->setTemplate(new ManiphestTransactionComment());
$differential_query->execute(); // What kind of object does this load?
btrahan edited edge metadata.
This revision is now accepted and ready to land.Mar 9 2015, 8:42 PM
This revision was automatically updated to reflect the committed changes.