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, Nov 24, 5:24 AM
Unknown Object (File)
Oct 25 2024, 12:01 PM
Unknown Object (File)
Oct 18 2024, 7:40 AM
Unknown Object (File)
Oct 16 2024, 12:14 PM
Unknown Object (File)
Oct 11 2024, 10:25 PM
Unknown Object (File)
Sep 26 2024, 7:21 PM
Unknown Object (File)
Sep 23 2024, 1:46 AM
Unknown Object (File)
Sep 5 2024, 4:56 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.