Review main Merged Breaking

80433[!!!][FEATURE] Add UriBuilder->buildUriFromRequest

Benni Mack CR +2 V +2 Hard +195 −207 updated 08/08/23, 08:53

Commit message

This change adds a new method buildUriFromRequest
inside TYPO3's Backend UriBuilder in order to
generate links to the current (or any) request
with additional parameters.

This is quite helpful to link to the same module
/route when a request is given, thus reducing
code duplication and unifies link generation.

In addition, the determineScriptUrl() and
getScriptUrl() methods inside LinkBrowsers
and ElementBrowsers are removed, and have been
removed from the LinkParameterProviderInterface
as well.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Anja Leichsenring +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • core-ci +1 CI

Issues 1

Files 23

Show 3 more files

Review log 2128

Show 23 earlier messages
  1. Benni Mack uploaded patch set 1 08/07/23, 13:16

  2. core-ci voted on patch set 1 V -1 08/07/23, 13:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45191

  3. Benni Mack uploaded patch set 2 V -1 08/07/23, 15:57

  1. core-ci voted on patch set 2 V +1 08/07/23, 16:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45195

  2. Benni Mack uploaded patch set 3 V +1 08/07/23, 16:17

  3. core-ci voted on patch set 3 V +1 08/07/23, 16:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45196

  4. Oliver Klee updated the commit message in patch set 4 V +1 08/07/23, 16:42

  5. core-ci voted on patch set 4 V +1 08/07/23, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45197

  6. Oliver Klee commented on patch set 4 08/07/23, 16:49

    Looks generally very good! I've added some comments regarding smaller details. Do we need to mark this breaking and add a breaking RST as we're dropping a method from the non-internal interface?

    UriBuilder.php:134

    We don't need this PHPDoc annotations for the parameters that have native type declarations.

    UriBuilder.php:137

    Please let's directly have a native `string` type annotation for `$referenceType`.

    UriBuilder.php:139

    `$route` is an object. So the check should be `!…instanceof` or `=== null` here, not using it as a boolean. Also, please let's not add (new) Symfony-style `assigning things in a condition`, but have the assignment on a separate line to reduce the cognitive load for reading the code.

    UriBuilder.php:142

    Please let's have a guard clause (as guard clauses should handle the error case).
  7. Benni Mack uploaded patch set 5 V +1 08/07/23, 19:02

  8. core-ci voted on patch set 5 V +1 08/07/23, 19:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45200

  9. Benni Mack commented on patch set 5 08/07/23, 22:15

    UriBuilder.php:134 Reply

    Done

    UriBuilder.php:137 Reply

    Done

    UriBuilder.php:139 Reply

    Done

    UriBuilder.php:142 Reply

    Done
  10. Benni Mack commented on patch set 5 08/07/23, 22:21

    Reply

    Removing methods from an interface is not per se breaking IMHO. I think we should add an Important.rst for this, and also remove isCurrentlySelectedItem() as well, as it serves no use anymore as well
  11. Benni Mack uploaded patch set 6 V +1 08/07/23, 22:26

  12. core-ci voted on patch set 6 V +1 08/07/23, 22:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45205

  13. Benni Mack uploaded patch set 7 V +1 08/07/23, 22:42

  14. core-ci voted on patch set 7 V +1 08/07/23, 22:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45206

  15. Benni Mack commented on patch set 7 08/07/23, 22:54

    Reply

    Done
  16. Anja Leichsenring voted on patch set 7 CR +1 08/08/23, 06:16

  17. Oliver Klee voted on patch set 7 V +1 CR +1 08/08/23, 07:48

  18. Oliver Klee commented on patch set 7 CR 0 08/08/23, 07:50

    UriBuilder.php:132

    Please let's have tests for this new method. Should I have a go at the tests?
  19. Benni Mack commented on patch set 7 08/08/23, 07:54

    UriBuilder.php:132 Reply

    What do you mean? I created functional tests
  20. Stefan Bürk voted on patch set 7 CR +1 08/08/23, 07:55

  21. Oliver Klee commented on patch set 7 CR +1 08/08/23, 08:10

    UriBuilder.php:132 Reply

    Oh. I completely missed those. I must have had "tomatoes on my eyes". Sorry for this, and thanks for pointing this out!
  22. Stefan Bürk voted on patch set 7 V +1 08/08/23, 08:26

  23. Stefan Bürk voted on patch set 7 V +2 CR +2 08/08/23, 08:29

  24. Stefan Bürk merged patch set 8 08/08/23, 08:29

  25. Benni Mack commented on patch set 8 08/08/23, 08:53

    UriBuilder.php:132 Reply

    no prob