91287[TASK] Add option to not add cache busting to generated URIs
Commit message
Review
-
Code review CR +2 Done
- Helmut Hummel +2
- Georg Ringer +1
- Garvin Hicking +1
- Simon Praetorius +1
-
Verified V +2 Done
- Helmut Hummel +2
- Georg Ringer +1
- Garvin Hicking +1
- Simon Praetorius +1
- core-ci +1 CI
Issues 1
Files 14
- typo3/sysext/core/Classes/Page/ImportMap.php7+19 −6
- typo3/sysext/core/Classes/Resource/ResourceCompressor.php2+15 −4
- typo3/sysext/core/Classes/Resource/ResourceFactory.php+6 −2
- typo3/sysext/core/Classes/SystemResource/Publishing/DefaultSystemResourcePublisher.php+2 −1
- typo3/sysext/core/Classes/SystemResource/Publishing/DefaultSystemResourceUriGenerator.php4+18 −5
- typo3/sysext/core/Classes/SystemResource/Publishing/UriGenerationOptions.php6+7 −0
- typo3/sysext/core/Classes/Utility/PathUtility.php+4 −2
- typo3/sysext/core/Documentation/Changelog/14.0/Breaking-107537-UrlGenerationSystemResources.rst5+11 −49
- typo3/sysext/core/Documentation/Changelog/14.0/Deprecation-107537-GetDataPath.rstdeleted+0 −61
- typo3/sysext/core/Tests/Functional/SystemResource/Publishing/DefaultResourcePublisherTest.php+38 −0
- typo3/sysext/core/Tests/Functional/Utility/PathUtilityPublicPathsTest.php+4 −4
- typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php+5 −2
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+4 −2
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php+1 −3
Review log 4356
Show 2431 earlier messages
-
Helmut Hummel uploaded patch set 1 10/27/25, 18:55
-
core-ci voted on patch set 1 V -1 10/27/25, 19:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87717
-
Helmut Hummel uploaded patch set 2
V -110/27/25, 19:54 -
core-ci voted on patch set 2 V +1 10/27/25, 20:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87729
-
Garvin Hicking commented on patch set 2 10/27/25, 20:15
-
Garvin Hicking commented on patch set 2 10/27/25, 20:26
ResourceCompressor.php:509```suggestion // @todo: Until a full refactor of this class, we return an URL relative to document root ``` -
Simon Praetorius commented on patch set 2 10/27/25, 20:41
UriGenerationOptions.php:34```suggestion * to specific implementations of SystemResourcePublisherInterface, ```UriGenerationOptions.php:35```suggestion * which means, that if other resource publishing stategies ``` -
Garvin Hicking commented on patch set 2 10/27/25, 20:53
UriGenerationOptions.php:35Reply```suggestion * which means, that if other resource publishing strategies ``` 😄 -
Simon Praetorius commented on patch set 2 10/27/25, 21:05
UriGenerationOptions.php:35Replynooo, damn it. I should just go to bed and let Garvin handle this. -
Helmut Hummel commented on patch set 2 10/28/25, 08:57
UriGenerationOptions.php:34ReplyFix applied. -
Helmut Hummel rebased onto patch set 3
V +110/28/25, 08:58 -
core-ci voted on patch set 3 V +1 10/28/25, 09:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87772
-
Helmut Hummel uploaded patch set 4
V +110/28/25, 09:09 -
Helmut Hummel commented on patch set 3 10/28/25, 09:09
UriGenerationOptions.php:35ReplyDone -
Helmut Hummel commented on patch set 4 10/28/25, 09:11
Breaking-107537-UrlGenerationSystemResources.rst:40ReplyDone -
Helmut Hummel commented on patch set 4 10/28/25, 09:11
ResourceCompressor.php:509ReplyDone -
Helmut Hummel uploaded patch set 5 10/28/25, 09:11
-
core-ci voted on patch set 4 V +1 10/28/25, 09:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87773
-
core-ci voted on patch set 5 V +1 10/28/25, 09:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87774
-
Oliver Klee updated the commit message in patch set 6
V +110/28/25, 11:01 -
core-ci voted on patch set 6 V +1 10/28/25, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87800
-
Helmut Hummel uploaded patch set 7
V +110/29/25, 20:46 -
core-ci voted on patch set 7 V +1 10/29/25, 20:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88046
-
Simon Schaufelberger commented on patch set 7 10/30/25, 01:20
-the -
Benjamin Franzke commented on patch set 7 10/30/25, 08:08
ImportMap.php:268Please explain why `render()` should receive a request. I think request is too generic and not explicit enough, since requiring a request does not reflect, what parts of the request is needed and if – at some point in time – attributes are used, which may not be available. I want this interface to be very explicit, since we also rely on it in install tool. If we need additonal data/information in render, then we should add it there. Maybe leave out this todo for now? -
Lina Wolf commented on patch set 7 11/01/25, 08:15
Breaking-107537-UrlGenerationSystemResources.rst:43Shouldn't an assests path be returned, for example /_assets/5f237792cbcdc97cfceade1e16ea33d7/Icons/Extension.svg -
Helmut Hummel commented on patch set 7 11/03/25, 08:16
ImportMap.php:268ReplyWell, https://github.com/TYPO3/typo3/blob/c3df7e73db0258f1fc344b4243ebf8067f425a44/typo3/sysext/core/Classes/SystemResource/Publishing/SystemResourcePublisherInterface.php#L35 needs a request. ImportMap renders URIs based on system resources, therefore it makes sense to depend on this interface to generate them, which it can't, when it does not receive a request. So better discuss now, whether to SystemResourcePublisherInterface has a too broad dependency to the request or not. Current default implementation needs at least NormalizedParams and also ApplicationType, when doing cache busting, due to different cache busting confg for FE and BE (maybe add a generic config, or drop this config at all?). What about future/ userland implementations of this interface? Can we be sure, they don't need a request? Can we know which request attributes they need? -
Helmut Hummel commented on patch set 7 11/03/25, 08:18
Breaking-107537-UrlGenerationSystemResources.rst:43ReplyAh, well. It is a matter of using Composer or Classic mode. I will make a note to add Comoposer mode example as well with _asset/ paths -
Helmut Hummel commented on patch set 7 11/03/25, 08:21
Reply
Done -
Helmut Hummel commented on patch set 7 11/03/25, 08:23
Breaking-107537-UrlGenerationSystemResources.rst:43ReplyDone -
Helmut Hummel commented on patch set 7 11/03/25, 08:52
ImportMap.php:268ReplyThe main issue with the current code structure and the sitePrefix dependency is, that URI generation and prefixing with a site path are two operations. This currently works, but will be unreliable or simply wrong when having a generic interface for URI generation, which can generate e.g. CDN URIs with scheme and CDN hostname. URI generation must happen as one operation in the future.
-
Helmut Hummel uploaded patch set 8
V +111/03/25, 09:31 -
Helmut Hummel commented on patch set 8 11/03/25, 09:33
ImportMap.php:268ReplyThat would be one way to resolve the todo's: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91406 -
core-ci voted on patch set 8 V +1 11/03/25, 09:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88351
-
Benjamin Franzke commented on patch set 8 11/03/25, 10:41
ImportMap.php:268ReplyThanks for your answer and proposal! > The main issue with the current code structure and the sitePrefix dependency is, that URI generation and prefixing with a site path are two operations. Understood, but ImportMap URL generation is separated into two steps on purpose: * We need to be able to warmup the importmap, without knowing the installation destination in CLI context `bin/typo3 cache:warmup -g system` * We want to use such a compiled importmap to a runtime determined basepath. That means from *my perspective* that's not an "issue", but a demand for URL generation, which the new design does not want to provide ;) > URI generation must happen as one operation in the future. I'm not fully sold to that idea (it's a good academic idea, but may fail in the face of reality, given the performance impact that everything needs to be done runtime or known upfront, but we'll see), but let's pretend we will do that: If we add the site path (=subdir installation prefix) to the importmap during compile time (e.g. in CLI context), we either will end up with two options * ignoring request-dependant sitePath, which ends up in breaking subdir installations or we * introduce a static sitePath configuration option to be able to support subdir's statically I'm not sure I like either of that, do you plan to make the sitePath a static option? I guess you'll face this problem more often (well, it's also easy to oversee, since we do not have good test coverage for that). Anyway, with the given proposal we end up unsupporting subdir installations, if I understand https://review.typo3.org/c/Packages/TYPO3.CMS/+/91406 correctly (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/91406/comment/614433b2_dd5ec860/). If we really want to "forbid" two-step URL generation, a possible solution *could* be to not cache URL paths in importmap cache at all, but only store system resource description objects and resolve all importmap URIs runtime. If the new resource API is able to handle that performantly – I'm fine. -
Helmut Hummel rebased onto patch set 9
V +111/03/25, 11:52 -
Helmut Hummel commented on patch set 9 11/03/25, 12:00
ImportMap.php:268Replywithout reading your comment here first I implemented what you proposed here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91406/ So I can mark this one as resolved, right? -
core-ci voted on patch set 9 V +1 11/03/25, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88364
-
Helmut Hummel commented on patch set 9 11/03/25, 12:45
ImportMap.php:268Reply> it's a good academic idea, but may fail in the face of reality, given the performance impact that everything needs to be done runtime or known upfront, but we'll see challenge accepted. > If the new resource API is able to handle that performantly – I'm fine. resolving resource might be costly indeed. with a central API though, it is possible to build a resource (URI) cache, that all usages will benefit from, not only ImportMap. Let's see what is needed here in the future. -
Simon Praetorius commented on patch set 9 11/03/25, 17:46
DefaultSystemResourceUriGenerator.php:69how can this be null? Or should it be nullable? In that case, the type of the property needs to be adjusted. -
Helmut Hummel commented on patch set 9 11/03/25, 17:49
DefaultSystemResourceUriGenerator.php:69Replyoh, of course thanks. nullable is not required here -
Helmut Hummel uploaded patch set 10
V +111/03/25, 17:52 -
Helmut Hummel commented on patch set 9 11/03/25, 17:52
DefaultSystemResourceUriGenerator.php:69ReplyDone -
Simon Praetorius voted on patch set 10 CR +1 V +1 11/03/25, 17:53
-
core-ci voted on patch set 10 V -1 11/03/25, 18:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88404
-
core-ci commented on patch set 10 11/03/25, 18:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88404
-
Helmut Hummel uploaded patch set 11
CR +1V +111/03/25, 18:42 -
Helmut Hummel commented on patch set 10 11/03/25, 18:42
DefaultSystemResourceUriGenerator.php:69Replyactually $this->options is nullable -
core-ci voted on patch set 11 V +1 11/03/25, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88410
-
Helmut Hummel uploaded patch set 12
V +111/03/25, 19:11 -
core-ci voted on patch set 12 V +1 11/03/25, 19:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88413
-
Simon Praetorius voted on patch set 12 CR +1 V +1 11/03/25, 19:53
-
Garvin Hicking voted on patch set 12 CR +1 V +1 11/03/25, 19:57
-
Georg Ringer voted on patch set 12 CR +1 V +1 11/03/25, 20:44
-
Helmut Hummel commented on patch set 12 CR +2 V +2 11/04/25, 08:05
Thanks! Some todos discussed here will be resolved in this: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91406/ -
Helmut Hummel merged patch set 13 11/04/25, 08:05
Breaking-107537-UrlGenerationSystemResources.rst:40