Page MenuHomePhabricator

Modularize complex HTTP parameter types
ClosedPublic

Authored by epriestley on Nov 4 2015, 5:09 PM.
Tags
None
Referenced Files
F14064374: D14402.diff
Mon, Nov 18, 11:18 PM
F14051397: D14402.diff
Fri, Nov 15, 12:41 AM
F14040364: D14402.diff
Mon, Nov 11, 9:37 AM
F14023931: D14402.diff
Thu, Nov 7, 4:13 AM
F13980454: D14402.id.diff
Oct 19 2024, 10:49 AM
F13973271: D14402.id34804.diff
Oct 18 2024, 12:10 AM
F13955119: D14402.id34792.diff
Oct 14 2024, 12:16 AM
Unknown Object (File)
Oct 11 2024, 3:41 PM
Subscribers
None

Details

Summary

Ref T9132. We have several places in the code that sometimes need to parse complex types. For example, we accept all of these in ApplicationSearch and now in ApplicationEditor:

/?subscribers=cat,dog
/?subscribers=PHID-USER-1111
/?subscribers[]=cat&subscribers[]=PHID-USER-2222

..etc. The logic to parse this stuff isn't too complex, but it isn't trivial either.

Right now it lives in some odd places. Notably, PhabricatorApplicationSearchEngine has some weird helper methods for this stuff. Rather than give EditEngine the same set of weird helper methods, pull all this stuff out into "HTTPParameterTypes".

Future diffs will add "Projects" and "Users" types where all the custom parsing/lookup logic can live. Then eventually the Search stuff can reuse these.

Generally, this just breaks the code up into smaller pieces that have more specific responsibilities.

Test Plan

Screen Shot 2015-11-04 at 9.05.11 AM.png (1×1 px, 193 KB)

Diff Detail

Repository
rP Phabricator
Branch
eengine9
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8602
Build 9945: Run Core Tests
Build 9944: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Modularize complex HTTP parameter types.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 4 2015, 7:46 PM
This revision was automatically updated to reflect the committed changes.