Page MenuHomePhabricator

Convert RouteHandlers and anonymous functions to Controllers
Closed, ResolvedPublic8 Estimated Story Points

Description

  • Move anonymous route functions from Routes.php and the RouteHandlers directory into controller classes, reference them in Routes.php (see AddDonation as an example).
  • Remove all references to the Application class (for getting services like session, etc). Find a different way to inject the session into the controller, e.g. as a request attribute
  • Replace calls to $app->json() with JsonResponse::create

One Controller class per route, except for routes that have POST and GET (then do two actions).

Event Timeline

gabriel-wmde set the point value for this task to 8.
gabriel-wmde updated the task description. (Show Details)
gabriel-wmde removed a subscriber: Tim_WMDE.
Calmelopez changed the point value for this task from 8 to 9.Sep 28 2020, 3:25 PM
Calmelopez reopened this task as Open.
kai.nissen changed the point value for this task from 9 to 8.Sep 29 2020, 7:41 AM
AbbanWMDE moved this task from Doing to Review on the WMDE-FUN-Sprint-2020-09-28 board.
AbbanWMDE added a subscriber: AbbanWMDE.