Page MenuHomePhabricator

Prepare TransactionCommentQuery for extension
ClosedPublic

Authored by epriestley on Mar 9 2015, 7:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 24, 4:59 AM
Unknown Object (File)
Feb 14 2024, 10:32 PM
Unknown Object (File)
Feb 14 2024, 10:32 PM
Unknown Object (File)
Feb 12 2024, 2:04 AM
Unknown Object (File)
Feb 7 2024, 9:56 PM
Unknown Object (File)
Feb 7 2024, 8:48 PM
Unknown Object (File)
Feb 3 2024, 7:10 PM
Unknown Object (File)
Feb 3 2024, 5:31 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
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.