1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 15:52:41 +01:00
phorge-phorge/src/applications/differential
epriestley 2218caee0f Reduce the amount of boilerplate that implementing FerretInterface requires
Summary:
See brief discussion in D18554. All the index tables are the same for every application (and, at this point, seem unlikely to change) and we never actually pass these objects around (they're only used internally).

In some other cases (like Transactions) not every application has the same tables (for example, Differential has extra field for inline comments), and/or we pass the objects around (lots of stuff uses `$xactions` directly).

However, in this case, and in Edges, we don't interact with any representation of the database state directly in much of the code, and it doesn't change from application to application.

Just automatically define document, field, and ngram tables for anything which implements `FerretInterface`. This makes the query and index logic a tiny bit messier but lets us delete a ton of boilerplate classes.

Test Plan: Indexed objects, searched for objects. Same results as before with much less code. Ran `bin/storage upgrade`, got a clean bill of health.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12819

Differential Revision: https://secure.phabricator.com/D18559
2017-09-07 13:23:31 -07:00
..
__tests__ phtize all the things 2015-05-22 21:16:39 +10:00
application Update menu item names for Applications -> Favorites 2017-09-05 19:05:03 -07:00
capability Simplify the implementation of PhabricatorPolicyCapability subclasses 2014-07-25 08:25:42 +10:00
command Define Differential email action in terms of EditEngine 2017-01-02 13:25:45 -08:00
conduit Make legacy revision statuses from "differential.query" have type "string" again 2017-08-29 13:05:02 -07:00
config Convert "enum" and "string" config options to new modular option types 2017-06-27 12:13:15 -07:00
constants Move all revision status transactions to modern values and mechanics 2017-08-12 04:05:57 -07:00
controller Update Create Diff page for new Edit UI 2017-09-06 10:14:58 -07:00
customfield Reduce callsites to "ArcanistDifferentialRevisionStatus" in Phabricator 2017-08-09 11:04:52 -07:00
doorkeeper Reduce callsites to "ArcanistDifferentialRevisionStatus" in Phabricator 2017-08-09 11:04:52 -07:00
edge Expose the commit/task/revision relationship edges to "edge.search" 2017-04-02 19:49:55 -07:00
editor Slightly simplify logic for determining if an inline comment has an effect 2017-08-24 15:26:32 -07:00
engine Make yellow "draft" bubbles more generic 2017-01-13 09:02:19 -08:00
engineextension Provide a "Reviewers" attachment to "differential.revision.search" 2017-04-06 14:46:39 -07:00
exception Remove an unused class 2015-01-03 09:07:32 +11:00
field Move misplaced validation for ambiguous fields in "Test Plan" to the right place 2017-06-30 06:36:05 -07:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
herald Fix a bad getStatus() call which is fataling during Herald rule evaluation 2017-03-22 10:03:38 -07:00
lipsum Rename "getReviewerStatus()" to "getReviewers()" 2017-03-20 17:11:40 -07:00
mail Rename "needReviewerStatus()" into "needReviewers()" 2017-03-20 16:46:16 -07:00
management Remove most of the legacy hunk code 2016-12-13 14:34:36 -08:00
parser Build a page for viewing all inline comments 2017-06-12 11:31:20 -07:00
phid Make all revision status readers explicitly read modern or legacy status 2017-08-11 17:22:22 -07:00
query Sort global fulltext results by overall relevance 2017-09-07 13:21:58 -07:00
relationships Convert all standard relationship-editing actions to modern Relationships code 2016-06-29 11:24:52 -07:00
remarkup Rename PhutilRemarkupRule subclasses 2014-08-05 00:55:43 +10:00
render Correct the generation of "<th />" IDs on left-hand-side of image changesets 2017-05-17 06:26:45 -07:00
search Reduce the amount of boilerplate that implementing FerretInterface requires 2017-09-07 13:23:31 -07:00
storage Reduce the amount of boilerplate that implementing FerretInterface requires 2017-09-07 13:23:31 -07:00
typeahead Add a Differential revision status tokenizer datasource 2017-08-11 13:35:15 -07:00
view Remove a debugging "echo" that crept in in dccd799b 2017-08-11 05:50:43 -07:00
xaction Fix an issue where "Close Revision" did not appear in the UI 2017-08-29 09:58:48 -07:00
DifferentialGetWorkingCopy.php Extend from Phobject 2015-06-15 18:02:27 +10:00