Page MenuHomePhabricator

Modularize complex HTTP parameter types
ClosedPublic

Authored by epriestley on Nov 4 2015, 5:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 12:28 AM
Unknown Object (File)
Wed, Mar 27, 11:16 PM
Unknown Object (File)
Feb 8 2024, 1:20 AM
Unknown Object (File)
Feb 8 2024, 1:20 AM
Unknown Object (File)
Feb 8 2024, 1:20 AM
Unknown Object (File)
Feb 7 2024, 8:47 PM
Unknown Object (File)
Feb 3 2024, 7:05 AM
Unknown Object (File)
Jan 25 2024, 11:48 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.