Review main Merged

77630[TASK] Drop internal annotation from Extbase's UriBuilder->setRequest()

Chris Müller CR +2 V +2 Easy +5 −2 updated 01/31/23, 12:23

Commit message

The setRequest() method is necessary to be called to set the current
request object when using the UriBuilder outside of an Extbase
controller or a view helper. The according changelog also states in
the migration section that the setRequest() method should be called.
So, we remove the internal annotation, so the method is now considered
as public API.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Torben Hansen +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Torben Hansen +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1518

  1. Chris Müller uploaded patch set 1 01/29/23, 17:19

  2. Chris Müller updated the commit message in patch set 2 01/29/23, 17:21

  3. core-ci voted on patch set 1 V +1 01/29/23, 17:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36733

  4. core-ci voted on patch set 2 V +1 01/29/23, 17:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36734

  5. Georg Ringer voted on patch set 2 V +1 CR +1 01/29/23, 19:12

  6. Benni Mack commented on patch set 2 CR -1 01/29/23, 20:49

    When using getRequest() without setRequest() I get an exception that this is an invalid type. $TYPO3_REQUEST needs to be made compatible when it is set now.
  7. Christian Kuhn uploaded patch set 3 CR +1 V +1 01/30/23, 13:35

  8. core-ci voted on patch set 3 V +1 01/30/23, 13:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36764

  9. Christian Kuhn commented on patch set 3 01/30/23, 14:34

    is that fine with you, benni?
  10. Torben Hansen commented on patch set 3 01/31/23, 08:09

    UriBuilder.php:182

    I don't think we have any place where `$GLOBALS['TYPO3_REQUEST']` is a `RequestInterface`, so this check is not required.
  11. Benni Mack commented on patch set 3 01/31/23, 08:38

    UriBuilder.php:182 Reply

    I'd leave this currently, as we might need to set "GLOBALS['TYPO3_REQUEST']" in Extbase's RequestBuilder in order to migrate custom extensions slowly to PSR-7 as well.
  12. Benni Mack voted on patch set 3 CR +1 01/31/23, 08:38

  13. Torben Hansen voted on patch set 3 V +1 CR +1 01/31/23, 08:47

  14. Christian Kuhn commented on patch set 3 01/31/23, 09:05

    UriBuilder.php:182 Reply

    Ack
  15. Christian Kuhn voted on patch set 3 V +2 CR +2 01/31/23, 09:05

  16. Christian Kuhn merged patch set 4 01/31/23, 09:05

  17. Torben Hansen commented on patch set 4 01/31/23, 09:28

    Post -1 I did not test all scenarios. We can not create a new request in `getRequest()`, since `$GLOBALS['TYPO3_REQUEST']` may not have `extbase` attribute. Currently, `Given request must have an attribute "extbase" of type ExtbaseAttribute` is thrown, when `$GLOBALS['TYPO3_REQUEST']` has no `extbase` attribute.
  18. Christian Kuhn commented on patch set 4 01/31/23, 12:23