Review main Merged

69674[TASK] Replace access to global request in extbase controllers

Oli Bartsch CR +2 V +2 Normal +15 −37 updated 06/30/21, 20:43

Commit message

Since #94428, the extbase Request implements the
PSR-7 ServerRequestInterface. Therefore, all usages
of $GLOBALS['TYPO3_REQUEST'] in core extbase
controllers are now replaced by accessing the extbase
Request object instead.

Since the extbase RequestInterface does not yet
extend the PSR-7 ServerRequestInterface, as this
would be a breaking change, the property type
annotation of $request is changed to the specifc
Request implementation, to still allow IDE support.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 2

Files 6

Review log 1115

  1. Oli Bartsch uploaded patch set 1 06/30/21, 16:53

  2. Oli Bartsch updated the commit message in patch set 2 06/30/21, 16:54

  3. core-ci voted on patch set 1 V +1 06/30/21, 17:03 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12861

  4. core-ci voted on patch set 2 V +1 06/30/21, 17:07 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12862

  5. Christian Kuhn commented on patch set 2 06/30/21, 17:13

    ActionController.php:134

    let's add a @todo we'll change this back to RequestInterface in v12 when RequestInterface extends ServerRequestInterface. Also add to RequestInterface: @todo v12: RequestInterface extends ServerRequestInterface

    ActionController.php:449

    let's add a hint here that we can drop this line in v12 again.
  6. Christian Kuhn commented on patch set 2 06/30/21, 17:14

    BackendUserController.php:615

    nice!

    AdministrationController.php:579

    yay :)
  7. Oli Bartsch uploaded patch set 3 06/30/21, 17:54

  8. Oli Bartsch commented on patch set 2 06/30/21, 17:57

    BackendUserController.php:615 Reply

    Ack

    ActionController.php:134 Reply

    Done

    ActionController.php:449 Reply

    This inline annotation needs to stay because UriBuilder->setRequest() as well as MvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest() use the concrete Request implementation as type hint, instead of RequestInterface.

    AdministrationController.php:579 Reply

    Ack
  9. core-ci voted on patch set 3 V +1 06/30/21, 18:03 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12866

  10. Christian Kuhn uploaded patch set 4 06/30/21, 19:18

  11. Christian Kuhn voted on patch set 4 V +1 CR +1 06/30/21, 19:20

  12. Jochen Roth voted on patch set 4 V +1 CR +1 06/30/21, 19:23

  13. core-ci voted on patch set 4 V +1 06/30/21, 19:28 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12871

  14. Oli Bartsch voted on patch set 4 V +2 CR +2 06/30/21, 20:43

  15. Oli Bartsch merged patch set 5 06/30/21, 20:43