Review main Ready for review Quiet

66322[FEATURE] Introduce new uri builder classes

Alexander Schnitzler CR -2 V +1 Nightmare +2417 −162 updated 11/04/26, 11:51

Commit message

Extbase comes with that UriBuilder class which does
way to much magic which makes it close to impossible
to refactor without being breaking.

To avoid that, a couple of new uri and routing related
classes have been introduced that decouple all the logic
of the UriBuilder.

Also, the current UriBuilder is a service with a state
which makes it necessary to reset the inner state before
building new uris.

Since the current UriBuilder builds frontend urls (plugins)
and backend urls (modules) but provided the same api for
both, it's not really possible to know that some options
are for frontend or backend uris only.

To solve all those issues, a couple of new classes are
introduced now.

First of all there are FrontendUri and BackendUri which
represent the actual uri itself with an api that shows
how the uris can be manipulated.

Then there are builders for both uris which both accept
uri builder options which are different for frontend and
backend uris.

Example 1:

- Frontend uris MUST be constructed with a mandatory pageId
  param to calculate the route from.
- Backend uris MUST be constructed with a mandatory route
  parameter and MAY have an optional pageId param.

Example 2:

- Frontend links can be built with an option to set the
  no_cache query argument. This is no longer possible
  for backend uris.

Something that is important to understand, is that the
uri builders are regular services now without any inner
state. Uris are regular (immutable) prototypes with an
inner state that cannot be altered. This change makes
rendering uris deterministic. The same url with the same
rendering options will always be rendered the same.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 42
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/22/66322/42 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/22/66322/42 && git cherry-pick FETCH_HEAD

Review

  • Code review CR -2 Blocked
    • Benni Mack -2
  • Verified V +1 Needs a vote
    • Oliver Klee +1
    • core-ci +1 CI

Merge conflicts 9

Issues 1

Files 20

Review log 96139

Show 77114 earlier messages
  1. Alexander Schnitzler uploaded patch set 1 10/27/20, 16:38

  2. Alexander Schnitzler wrote 10/27/20, 16:39

    Topic set to extbase
  3. TYPO3com voted on patch set 1 V -1 10/27/20, 16:51 Completed build in 05m 15s on Tue, 27 Oct, 04:51 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6922

  4. Alexander Schnitzler uploaded patch set 2 10/30/20, 18:09

  5. TYPO3com voted on patch set 2 V -1 10/30/20, 18:09 Completed build in 20s on Fri, 30 Oct, 06:09 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7039

  6. Alexander Schnitzler uploaded patch set 3 10/30/20, 18:13

  7. Alexander Schnitzler uploaded patch set 4 10/30/20, 18:21

  8. TYPO3com voted on patch set 3 V -1 10/30/20, 18:24 Completed build in 11m 09s on Fri, 30 Oct, 06:24 PM Test Summary: 138 of 74126 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7040

  9. TYPO3com voted on patch set 4 V -1 10/30/20, 18:32 Completed build in 11m 16s on Fri, 30 Oct, 06:32 PM Test Summary: 30 of 74126 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7041

  10. Alexander Schnitzler uploaded patch set 5 10/30/20, 18:38

  11. TYPO3com voted on patch set 5 V -1 10/30/20, 18:49 Completed build in 11m 02s on Fri, 30 Oct, 06:49 PM Test Summary: 138 of 74126 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7042

  12. Alexander Schnitzler uploaded patch set 6 10/31/20, 11:59

  13. TYPO3com voted on patch set 6 V -1 10/31/20, 12:11 Completed build in 11m 51s on Sat, 31 Oct, 12:11 PM Test Summary: 12 of 74252 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7047

  14. Alexander Schnitzler uploaded patch set 7 10/31/20, 13:12

  15. Alexander Schnitzler uploaded patch set 8 10/31/20, 13:21

  16. TYPO3com voted on patch set 7 V -1 10/31/20, 13:24 Completed build in 12m 23s on Sat, 31 Oct, 01:24 PM Test Summary: 1 of 74240 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7048

  17. TYPO3com voted on patch set 8 V -1 10/31/20, 13:38 Completed build in 15m 31s on Sat, 31 Oct, 01:38 PM Test Summary: 1 of 74240 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7050

  18. Mathias Brodala commented on patch set 8 12/01/20, 08:19

    Am I right that Extbase moving closer to the original PSR-7 request will also find its way into this?

    ActionController.php:926

    Just from reading this could be done unconditionally just like the plugin namespace below. If the plugin name is the same, nothing changes. If it is different, it must be set. So no need for an additional check. Otherwise the next question would be why there is no such check for the plugin namespace. ;-)

    AbstractUri.php:25

    Yes please. :-)
  19. Alexander Schnitzler commented on patch set 8 12/02/20, 12:22

    ActionController.php:926 Reply

    The problem is that getPluginNameByAction can return null and that contradicts the withPluginName method. getPluginNamespace however always return a string as it takes the pluginName from the configuraration manager when it's null. That's another construction site I am on but for now I would keep it as is.
  20. Alexander Schnitzler uploaded patch set 9 12/02/20, 12:37

  21. TYPO3com voted on patch set 9 V -1 12/02/20, 12:48 Completed build in 10m 41s on Wed, 2 Dec, 12:48 PM Test Summary: 1 of 32712 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7747

  22. Alexander Schnitzler uploaded patch set 10 12/02/20, 14:32

  23. Alexander Schnitzler commented on patch set 10 12/02/20, 14:34

    > Patch Set 8: > > (2 comments) > > Am I right that Extbase moving closer to the original PSR-7 request will also find its way into this? We are not there quite yet but that's the goal. A PSR-7 compatible request object with some more Extbase related properties.
  24. TYPO3com voted on patch set 10 V +1 12/02/20, 14:42 Completed build in 09m 40s on Wed, 2 Dec, 02:42 PM Test Summary: 32471 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7748

  25. Alexander Schnitzler commented on patch set 10 12/02/20, 14:43

    We still need a rest file but I would love to see some reviews first. What do you think of this new approach?

    ActionController.php:944

    I guess this should go into a dedicated service but I didn't come up with a good name yet. If anyone has an idea, shoot.
  26. Alexander Schnitzler uploaded patch set 11 12/03/20, 09:13

  27. TYPO3com voted on patch set 11 V +1 12/03/20, 09:57 Completed build in 19m 02s on Thu, 3 Dec, 09:57 AM Test Summary: 32471 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7751

  28. Alexander Schnitzler commented on patch set 11 12/04/20, 08:25

    ActionController.php:944 Reply

    Done
  29. Alexander Schnitzler uploaded patch set 12 12/09/20, 11:59

  30. TYPO3com voted on patch set 12 V -1 12/09/20, 12:09 Completed build in 10m 08s on Wed, 9 Dec, 12:09 PM Test Summary: 31051 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7992

  31. TYPO3com voted on patch set 12 V +1 12/09/20, 12:13 Completed build in 24m 32s on Wed, 9 Dec, 12:13 PM Test Summary: 32473 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7992

  32. Alexander Schnitzler commented on patch set 12 12/10/20, 15:25

    BackendUriBuilder.php:29

    Avoid SingletonInterface and mark this shared via Services.yaml

    FrontendUriBuilder.php:26

    Avoid SingletonInterface and mark this shared via Services.yaml

    UriBuilder.php:34

    Avoid SingletonInterface and mark this shared via Services.yaml
  33. Alexander Schnitzler uploaded patch set 13 12/11/20, 09:44

  34. TYPO3com voted on patch set 13 V +1 12/11/20, 09:52 Completed build in 08m 34s on Fri, 11 Dec, 09:52 AM Test Summary: 32479 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8058

  35. Alexander Schnitzler uploaded patch set 14 12/11/20, 10:05

  36. TYPO3com voted on patch set 14 V +1 12/11/20, 10:14 Completed build in 08m 53s on Fri, 11 Dec, 10:14 AM Test Summary: 32479 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8059

  37. Torben Hansen commented on patch set 14 12/13/20, 18:37

    UriBuilder.php:103

    Is this condition/typecast required? $pageUid is either null or integer. If we e.g. pass the string '123' to this parameter, it will automatically be typecasted to int by PHP afaik.
  38. Tymoteusz Motylewski commented on patch set 14 12/13/20, 21:15

    is this chhange coordinated with changes to core eg https://review.typo3.org/c/Packages/TYPO3.CMS/+/67083 ? shouldnt parts of this patch be part of the core and not extbase eg backend uri?
  39. Alexander Schnitzler commented on patch set 14 12/14/20, 07:02

    Reply

    No, these changes are not coordinated with the other patch but they don't contradict each other since I am calling the core api. > shouldnt parts of this patch be part of the core and not extbase eg backend uri? Well, the Uri and UriBuilderOption classes don't have Extbase specific features, so those could be placed into the core but the UriBuilders aren't cleanly separated from Extbase since they use the DomainObjectArgumentsConverter to convert Models to Arguments. That's something we don't want to put into the core to keep the dependencies between packages as is. Possible would be to introduce an UriBuilderInterface with just a build method, which takes the Uri and the Options and returns a Uri(PSR) instance. We then could add different implementations for the core and extbase with the extbase implementation dealing with models as well. Questions is: Does the core want to have a new api for uri's as well? Personally I find this approach quite nice because I cannot remember how to build an uri with typolink. But in the end I started this patch to have a new api for Extbase, not one for the entire core.
  40. Alexander Schnitzler commented on patch set 14 12/14/20, 07:03

    UriBuilder.php:103 Reply

    Yes, indeed. This code is copied over from the current UriBuilder where we don't have type hints. Good catch!
  41. Benni Mack commented on patch set 14 12/18/20, 10:40

    Reply

    Extbase UriBuilder is a layer on top of Backend's UriBuilder. Just as Extbase Request/Response will be a superset of PSR-7 to move to a better state.
  42. Benni Mack commented on patch set 14 12/18/20, 10:48

    will we get to a point to have a Uri implementing PSR-7 UriInterface?
  43. Alexander Schnitzler commented on patch set 14 12/18/20, 15:16

    Reply

    I don't know how we would benefit from it because the Uri classes in this patch do not represent full urls. You can't create a url string from just the information that is stored in those objects because either routes or page id's have to be evaluated and converted to paths with the uri builders. PSR-7 uris are objects that represent an actual uri string, the classes here are uri builder instructions so to speak. Maybe the naming is wrong.
  44. Benni Mack commented on patch set 14 CR +1 12/19/20, 14:09

    Reply

    OK. thanks for the insights!
  45. Alexander Schnitzler rebased onto patch set 15 12/19/20, 14:55

  46. Alexander Schnitzler uploaded patch set 16 12/19/20, 14:59

  47. TYPO3com voted on patch set 15 V +1 12/19/20, 15:04 Completed build in 09m 00s on Sat, 19 Dec, 03:04 PM Test Summary: 32592 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8317

  48. TYPO3com voted on patch set 16 V +1 12/19/20, 15:08 Completed build in 08m 39s on Sat, 19 Dec, 03:08 PM Test Summary: 32594 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8318

  49. Alexander Schnitzler commented on patch set 16 12/19/20, 15:25

    UriBuilder.php:126

    This is something we need to avoid in the future when we have access to the server request params. But for now we need to rely on either _GP() or the possibly globally available server request. The latter seems less reliable though.
  50. Torben Hansen voted on patch set 16 V +1 CR +1 12/20/20, 18:17

  51. Alexander Schnitzler commented on patch set 16 01/07/21, 15:08

    ping
  52. Benjamin Franzke commented on patch set 16 CR -1 01/07/21, 15:48

    Hey Alex, without having looked at the code yet, this will need a Feature.rst (therefore -1 for now). Furthermore I'd ask for more than two voters here, because it's quite a change to introduce such API. I personally have the gut feeling that it would be great to encourage users to use more core API in extbase (e.g. $site->getRouter()->generateUri()), and rather offer extensions that help to work with the core fe/be APIs. The advantage would be that the same API can be used to generate URLs to extbase resources from inside and outside extbase. But I'm absolutely not sold on that, it's rather food for more thoughts on this topic.
  53. Alexander Schnitzler commented on patch set 16 01/07/21, 18:36

    Reply

    I'm also fine with a core api as long as we are able to introduce a proper new api the seperates prototypes and services. And as you can see, there are a good amount of tests showing what the new classes do. Actually, this is the old UriBuilder split into many classes while keeping the same api uriFor() for convenience. btw: I won't write a rst file before having more reviews and a concensus about this patch. It already took many hours and I don't want to spend more time in case there is another, more appreciated approach after being ignored for 2 months.
  54. Alexander Schnitzler commented on patch set 16 03/12/21, 08:31

    Would really like to get some feedback here. This is one of the rather bad experiences in the last years of my contributions. I spent a lot of time on this patch. Me and Benjamin asked for more reviewers and this patch is just stuck for months now.
  55. Alexander Schnitzler commented on patch set 16 03/26/21, 12:33

    Anyone interested in this change?
  56. Mathias Brodala commented on patch set 16 03/26/21, 13:58

    Reply

    Yes, just from reading I love the change but obviously the change is rather large and needs time to properly review. One thing I noticed is that the current UriBuilder basically stays unchanged. Shouldn't it become an empty shell and call one of the 2 new builders depending on context? Or at least be deprecated in favor of these 2?
  57. Simon Schaufelberger commented on patch set 16 CR +1 10/19/21, 00:02

    this would be great to have it ready for v12 imho and deprecate the old class
  58. Simon Schaufelberger uploaded patch set 17 10/19/21, 14:21

  59. core-ci voted on patch set 17 V -1 10/19/21, 14:23 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18320

  60. Simon Schaufelberger uploaded patch set 18 10/19/21, 14:29

  61. core-ci voted on patch set 18 V -1 10/19/21, 14:41 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18321

  62. Alexander Schnitzler commented on patch set 18 11/05/21, 15:22

    What about this patch? Do we want this in or not? Last thing I know is that Benjamin Franzke wanted to solve this differently, with an advanced core api. Is this realistic? If not, I'd say that this patch is already a good replacement for the current one and easier to move away from in the future if necessary.
  63. Benni Mack commented on patch set 18 11/26/21, 22:43

    @Alexander: Let's have a chat / call next week, I do have some ideas on how to improve Extbase in general for v12, where this change should be merged afterwards...
  64. Benni Mack voted on patch set 18 CR -1 11/26/21, 22:43

  65. Benni Mack wrote 11/29/21, 10:20

    Change destination moved from master to main
  66. Benni Mack updated the commit message in patch set 19 11/29/21, 14:06

  67. core-ci voted on patch set 19 V -1 11/29/21, 18:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20087

  68. Simon Schaufelberger uploaded patch set 20 03/22/22, 22:40

  69. core-ci voted on patch set 20 V -1 03/22/22, 23:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25060

  70. Alexander Schnitzler marked it work in progress 04/13/22, 12:25

  71. Alexander Schnitzler uploaded patch set 21 04/13/22, 12:25

  72. core-ci voted on patch set 21 V -1 04/13/22, 12:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25979

  73. Alexander Schnitzler uploaded patch set 22 04/13/22, 12:46

  74. core-ci voted on patch set 22 V -1 04/13/22, 13:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25980

  75. Alexander Schnitzler uploaded patch set 23 04/13/22, 13:56

  76. core-ci voted on patch set 23 V -1 04/13/22, 14:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25982

  77. Alexander Schnitzler uploaded patch set 24 04/13/22, 14:31

  78. core-ci voted on patch set 24 V -1 04/13/22, 14:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25984

  79. Alexander Schnitzler uploaded patch set 25 04/13/22, 15:04

  80. core-ci voted on patch set 25 V -1 04/13/22, 15:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25985

  81. Alexander Schnitzler uploaded patch set 26 04/13/22, 15:26

  82. core-ci voted on patch set 26 V -1 04/13/22, 15:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25987

  83. Alexander Schnitzler uploaded patch set 27 04/13/22, 15:57

  84. core-ci voted on patch set 27 V -1 04/13/22, 16:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25990

  85. Alexander Schnitzler uploaded patch set 28 04/13/22, 16:35

  86. core-ci voted on patch set 28 V -1 04/13/22, 16:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25995

  87. Alexander Schnitzler uploaded patch set 29 04/14/22, 07:04

  88. core-ci voted on patch set 29 V -1 04/14/22, 07:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26011

  89. Simon Schaufelberger uploaded patch set 30 06/18/22, 21:22

  90. core-ci voted on patch set 30 V -1 06/18/22, 21:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28191

  91. Simon Schaufelberger uploaded patch set 31 06/20/22, 00:09

  92. Simon Schaufelberger commented on patch set 31 06/20/22, 00:10

    BackendUriBuilder.php:29 Reply

    Done

    FrontendUriBuilder.php:26 Reply

    Done

    FrontendUriBuilder.php:45

    In the original UriBuilder there is a check for "format" here which should be also part of the new UriBuilder.

    UriBuilder.php:34 Reply

    Done
  93. Simon Schaufelberger commented on patch set 31 06/20/22, 00:11

    ActionController.php:926 Reply

    Done

    UriBuilder.php:103 Reply

    Done
  94. core-ci voted on patch set 31 V -1 06/20/22, 00:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28230

  95. Simon Schaufelberger commented on patch set 31 06/20/22, 01:12

    FrontendUriBuilder.php:45 Reply

    See \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::setFormat It is documented here: https://docs.typo3.org/m/typo3/reference-typoscript/7.6/en-us/Functions/Typolink/Index.html#:~:text=typolink.parameter%20%3D%2051%2C100%2C%26test%3D1%20%2D%20%2D%20%22RSS%20Feed%22 The problem is that it depends on the extension name which is not available here yet.
  96. Simon Schaufelberger uploaded patch set 32 06/20/22, 01:38

  97. Simon Schaufelberger commented on patch set 32 06/20/22, 01:40

    FrontendUriBuilder.php:45 Reply

    Done
  98. core-ci voted on patch set 32 V -1 06/20/22, 01:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28232

  99. Simon Schaufelberger uploaded patch set 33 06/20/22, 19:30

  100. core-ci voted on patch set 33 V -1 06/20/22, 19:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28278

  101. Simon Schaufelberger uploaded patch set 34 06/20/22, 21:27

  102. core-ci voted on patch set 34 V -1 06/20/22, 21:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28279

  103. Simon Schaufelberger uploaded patch set 35 06/20/22, 21:43

  104. core-ci voted on patch set 35 V +1 06/20/22, 21:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28280

  105. Stefan Bürk marked it ready for review 06/20/22, 21:58

  106. Simon Schaufelberger commented on patch set 35 06/20/22, 22:47

    Reply

    I propose to deprecate the old UriBuilder in another patch and then also replace the old UriBuilder with the new one in the backend wherever it is currently used.
  107. Simon Schaufelberger uploaded patch set 36 06/20/22, 22:48

  108. core-ci voted on patch set 36 V +1 06/20/22, 22:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28281

  109. Simon Schaufelberger voted on patch set 36 V +1 CR +1 06/20/22, 22:58

  110. Christian Kuhn commented on patch set 36 06/24/22, 12:50

    i'm unsure on this in general: we already have two distinct uriBuilders: core & extbase. adding a third one does not seem to improve the situation in general. what's the real plan on this and how to achieve it?
  111. Simon Schaufelberger commented on patch set 36 06/24/22, 13:05

    Reply

    I propose to deprecate the old UriBuilder in another patch and then also replace the old UriBuilder with the new one in the backend wherever it is currently used. Otherwise this whole patch will be huge, do you agree or what do you suggest?
  112. Alexander Schnitzler commented on patch set 36 07/31/22, 12:41

    Reply Unresolved

    @Benjamin: I'd like to draw your attention to this one once again. What about you feelings about this patch as of today. I'd like to have clarity about what happens here. You raised your concerns a year ago, now Christian Kuhn does as well. I'd like to have a clear statement from you and Christian to either abandon and forget this patch or to get it merged. But this current state drains to much energy from me and other contributors. We need a clear signal here. Pro or con. Merge or abandon. Thanks in advance, mate.

    Reply Unresolved

    @Mathias: Are you ok with that proposal? Can we close this thread?

    Reply

    @Christian: Is this something you can agree on? What Simon described was my initial plan as well. I'd like to avoid those deadlock situations where someone comes along, asks a question and then all momentum gets lost.
  113. Simon Schaufelberger commented on patch set 36 08/01/22, 18:42

    Reply

    Lolli asked me directly if we could actually get rid of an own Extbase BackendUriBuilder and use the one from the core instead and if required, extend it. Alex, would you invest a bit time to merge them together? If not, I will have a look in the next few weeks. My time is just a bit limited as I will focus on other things in life from October on. I already invested quite a lot of hours already in stabilizing the tests and really want to get this merged sooner or later.
  114. Alexander Schnitzler commented on patch set 36 08/03/22, 16:33

    Reply Unresolved

    I am sorry but my time is also very limited and my life will also change a lot as of october. Unfortunately I am not really familiar with the current routing api, so I cannot really say if we can simply switch over or still need some kind of new proxy api in extbase. I presume the latter just for convenience though.
  1. Benni Mack commented on patch set 36 CR -2 08/04/22, 09:23

    Will assign this job to me and will stay in touch with Alex. No sweats.
  2. Alexander Schnitzler abandoned the change 03/17/23, 14:26

  3. Simon Schaufelberger commented on patch set 36 03/18/23, 00:54

    That is so sad. I also invested quite a lot of time into this and really wanted to have this separation of the uri builder classes. @Benni: Can you comment on that?
  4. Benni Mack commented on patch set 36 03/22/23, 22:49

    Reply

    No worries. This patch can be restored again. Alex is currently working on other areas of Extbase, However, my gut feeling tells me we might not need the backend UriBuilder approach anymore and just move UriBuilder to Alex' implementation for the frontend (probably v13). that's my current suggestion. Just remove all backend logic from the UriBuilder, basically.
  5. Alexander Schnitzler restored the change 09/28/26, 12:08

  6. Alexander Schnitzler uploaded patch set 37 CR +1 V +1 09/28/26, 12:08

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  7. Alexander Schnitzler commented on patch set 37 09/28/26, 12:11

    Patchset 37 is just a rebase, more changes will follow.
  8. core-ci voted on patch set 37 V -1 09/28/26, 12:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109418

  9. Alexander Schnitzler uploaded patch set 38 V -1 09/28/26, 12:45

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  10. core-ci voted on patch set 38 V +1 09/28/26, 12:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109422

  11. Alexander Schnitzler uploaded patch set 39 V +1 09/28/26, 13:50

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  12. core-ci voted on patch set 39 V +1 09/28/26, 13:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109429

  13. Alexander Schnitzler commented on patch set 39 09/28/26, 14:09

    This change is ready for review.
    Hi folks, I had a look at this patch again and I still think this idea could land, let me explain the plan — also addressing your comments directly. Christian's "what's the real plan": The plan is to land this in two steps, precisely to keep this patch from growing into an unreviewable everything-change: This patch introduces the new, request-independent API (FrontendUri/BackendUri as immutable value objects, FrontendUriBuilder/BackendUriBuilder as the stateless services that resolve them) — and, just as importantly, makes the existing Extbase\Mvc\Web\Routing\UriBuilder build its uris through that new API internally. Its public surface (uriFor(), buildFrontendUri(), buildBackendUri(), all the setters) is unchanged; only the internals were rewired. That rewiring is the actual proof the new API is a complete replacement, not just a parallel one: every existing behavior of the old builder (including edge cases like addQueryString('untrusted') and non-numeric language values) now round-trips through FrontendUri/FrontendUriBuilder, backed by the full existing test suite plus new coverage for the cases that surfaced along the way. What this patch deliberately does not do is deprecate Extbase\Mvc\Web\Routing\UriBuilder. It can't, yet: Fluid's own f:uri.action, f:link.action, f:form, and be:menus.actionMenuItem ViewHelpers still call into it directly, and those run on essentially every Extbase-based page. Deprecating it now would mean Core triggers deprecation warnings on totally ordinary template usage that a site owner has no way to act on — that's not something Core is allowed to do to itself. So the sequencing has to be: new API first (this patch) → migrate those ViewHelpers to call FrontendUriBuilder/BackendUriBuilder directly (follow-up) → only then deprecate the old class, once nothing in Core still depends on it. I'll open that as a separate issue once this lands. On dropping the backend half (Benni): I get the instinct, but BackendUriBuilder isn't a third implementation — it delegates to the exact same Backend\Routing\UriBuilder that the existing Extbase UriBuilder already calls today for backend links (see Mvc\Web\Routing\UriBuilder::buildBackendUri(), unchanged by this patch, which does the same thing). The only thing new is the value-object API sitting in front of it. Keeping frontend and backend symmetric means the shim — and any extension that wants to opt into the new API directly ahead of the ViewHelper migration — gets one consistent, request-independent way to build either kind of uri, rather than only half the problem being solved.
  14. Markus Klein uploaded patch set 40 V +1 10/09/26, 11:50

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  15. core-ci voted on patch set 40 V -1 10/09/26, 12:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110596

  16. Markus Klein rebased onto patch set 41 V -1 10/11/26, 11:35

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  17. core-ci voted on patch set 41 V +1 10/11/26, 11:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110848

  18. Simon Schaufelberger commented on patch set 41 CR +1 V +1 10/22/26, 19:23

    I'd love to see this in v15 as well!
  19. Simon Schaufelberger commented on patch set 41 CR 0 V 0 10/22/26, 19:25

    BackendUri.php:25

    use protected property promotion

    FrontendUri.php:28

    uses protected property promotion

    FrontendUriBuilder.php:34

    use private property promotion
  20. Oliver Klee voted on patch set 41 V +1 10/22/26, 19:38

  21. Alexander Schnitzler commented on patch set 41 11/04/26, 09:12

    Unresolved

    @benni@typo3.org what do you think about your -2 here now?
  22. Alexander Schnitzler uploaded patch set 42 V +1 11/04/26, 09:21

    Copied Votes: * Code-Review-2 (copy condition: "changekind:NO_CHANGE OR **is:MIN**")
  23. Alexander Schnitzler commented on patch set 42 11/04/26, 09:23

    BackendUri.php:25 Reply

    Done

    FrontendUri.php:28 Reply

    Done

    FrontendUriBuilder.php:34 Reply

    Done
  24. core-ci voted on patch set 42 V +1 11/04/26, 09:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113266

  25. Oliver Klee voted on patch set 42 V +1 11/04/26, 11:51