Page MenuHomePhabricator

Use Symfony for routing in backend application
Open, LowPublic

Description

As a developer,
I want to write unit tests for my routes/controllers,
so that I'm sure that my routes work as expected and I can create releases with confidence.

Acceptance Criteria:

  • All paths of the backend application are tested with a standard PHPUnit environment.
  • Existing Silex routes are converted to Symfony Flex
  • index.php and web resources are in a web directory for added security (php and config files should not be accessible via URL)

Background:
Currently, the backend application assumes the existence of a web server and has no provisions for generating a request and response object that can be tested. Therefore it would be good to have a similar structure as in the frontend: A Symfony application with routes that call different use cases and egde-to-egde tests for each route.

This story does not have to be implemented all at once, but every time someone touches the code for a specific route. During this phase, the current "Router" (Fundraiser class) and Request construction can be done in the Symfony 404 error handling as a fallback for routes that have not been converted.

A very ease test case for this would be the route /util/status/check

Event Timeline

Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
Qse24h closed this task as a duplicate of T164723: New git repository: <repo name>.
gabriel-wmde renamed this task from Use Silex for routing in backend application to Use Symfony for routing in backend application.May 3 2018, 6:04 AM
gabriel-wmde updated the task description. (Show Details)