Skip to content
Snippets Groups Projects
Commit e487cf52 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Create own response instance in controller actions

To further support the PSR-7 / PSR-15 and removal of
GeneralUtility::_GP() and friends efforts, all controllers
no longer use the second 'ResponseInterface $response'
argument given by dispatchers: Dispatchers should not
assume which type of response a controller returns, there
is no point in preparing this object.

Instead, controllers now always create one of
HtmlResponse, JsonResponse or RedirectResponse on
their own and return these objects.

Changes overview:
* Always use "new" to instantiate a response, PSR-15
  middlewares allow fiddling with the object if needed,
  xclassing these classes is never needed, we instead
  can rely on proper API usage.
* All controller actions drop the second $response argument
  and add ResponseInterface return type hint.
* Some controllers action also drop first $request argument,
  but only if the action does not need access to ServerParams
  at all. Those controllers that access _GP or _POST or similar
  cur...
parent 2b6a19ea
No related merge requests found
Showing
with 169 additions and 247 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment