Homec4science

Modularize complex HTTP parameter types

Authored by epriestley <git@epriestley.com> on Nov 4 2015, 14:05.

Description

Modularize complex HTTP parameter types

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: {F944142}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9132

Differential Revision: https://secure.phabricator.com/D14402

Details

Committed
epriestley <git@epriestley.com>Nov 4 2015, 21:05
Pushed
aubortJan 31 2017, 17:16
Parents
rPH9de4bc6f3acf: Slightly improve organization of PhabricatorApplicationEditEngine
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH20e4c3fbd46b: Modularize complex HTTP parameter types (authored by epriestley <git@epriestley.com>).Nov 4 2015, 21:05