Page MenuHomePhabricator

Prepare TransactionCommentQuery for extension
ClosedPublic

Authored by epriestley on Mar 9 2015, 7:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 3:36 AM
Unknown Object (File)
Tue, Dec 10, 9:15 PM
Unknown Object (File)
Tue, Dec 3, 7:50 AM
Unknown Object (File)
Sat, Nov 30, 3:21 PM
Unknown Object (File)
Thu, Nov 28, 12:50 PM
Unknown Object (File)
Sun, Nov 24, 5:24 AM
Unknown Object (File)
Oct 25 2024, 12:01 PM
Unknown Object (File)
Oct 18 2024, 7:40 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
4–5

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.