Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • T TYPO3.CMS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • accessibilityaccessibility
  • TYPO3.CMS
  • Repository
Switch branch/tag
  • TYPO3.CMS
  • ..
  • ContentElement
  • ElementInformationController.php
Find file BlameHistoryPermalink
  • Christian Kuhn's avatar
    [TASK] Create own response instance in controller actions · e487cf52
    Christian Kuhn authored Feb 16, 2018
    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
      currently, keep $request for now - they have to be refactored
      later anyway and then need $request.
    
    Change-Id: Icce283b3c19be14ef1adeec761cfd63c90ab24c5
    Resolves: #83939
    Releases: master
    Reviewed-on: https://review.typo3.org/55754
    
    
    Tested-by: default avatarTYPO3com <no-reply@typo3.com>
    Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
    Tested-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
    Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
    Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
    Reviewed-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
    Tested-by: Benjamin Kott's avatarBenjamin Kott <benjamin.kott@outlook.com>
    Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
    e487cf52