Page MenuHomePhabricator

Allow Controllers to return a wider range of "response-like" objects
ClosedPublic

Authored by epriestley on Sep 1 2015, 5:26 PM.
Tags
None
Referenced Files
F15534325: D14032.id33925.diff
Wed, Apr 23, 11:45 PM
F15530662: D14032.id33934.diff
Wed, Apr 23, 6:50 AM
F15527995: D14032.id33926.diff
Tue, Apr 22, 8:12 AM
F15525406: D14032.id33925.diff
Mon, Apr 21, 2:11 PM
F15510124: D14032.id33926.diff
Wed, Apr 16, 6:51 PM
F15510123: D14032.id33925.diff
Wed, Apr 16, 6:51 PM
F15510122: D14032.id.diff
Wed, Apr 16, 6:51 PM
F15510121: D14032.diff
Wed, Apr 16, 6:51 PM
Subscribers

Details

Summary

Ref T1806. Ref T5752. Currently, handleRequest() needs to return an AphrontResponse, but sometimes it's really convenient to return some other object, like a Dialog, and let that convert into a response elsewhere.

Formalize this and clean up some of the existing hacks for it so there's less custom/magical code in Phabricator-specific classes and more general code in Aphront classes.

More broadly, I want to clean up T5752 before pursuing T9132, since I'm generally happy with how SearchEngine works except for how it interacts with side navs / application menus. I want to fix that first so a new Editor (which will have a lot in common with SearchEngine in terms of how controllers interact with it) doesn't make the problem twice as bad.

Test Plan
  • Loaded a bunch of normal pages.
  • Loaded dialogs.
  • Loaded proxy responses (submitted empty comments in Maniphest).

Diff Detail

Repository
rP Phabricator
Branch
eengine1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 7877
Build 8785: [Placeholder Plan] Wait for 30 Seconds
Build 8784: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Allow Controllers to return a wider range of "response-like" objects.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
joshuaspence added inline comments.
src/aphront/configuration/AphrontApplicationConfiguration.php
483

Opyt

src/aphront/interface/AphrontResponseProducerInterface.php
13

Personally I feel that naming an interface with Interface is odd.

chad edited edge metadata.
This revision is now accepted and ready to land.Sep 1 2015, 10:38 PM
This revision was automatically updated to reflect the committed changes.