77018[FEATURE] Streamline FE/versionNumberInFilename to 'EXT:' resources
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Josef Glatz +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Benni Mack +2
- Josef Glatz +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/13.2/Feature-99203-StreamlineFEversionNumberInFilenameToEXTResources.rstnew+60 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php4+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/ResourceViewHelperTest.php+16 −8
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php4+8 −0
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php10+40 −0
Review log 5686
Show 3961 earlier messages
-
Christoph Lehmann uploaded patch set 1 12/11/22, 22:31
-
Christoph Lehmann updated the commit message in patch set 2 12/11/22, 22:35
-
core-ci voted on patch set 1 V -1 12/11/22, 22:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34885
-
Christoph Lehmann updated the commit message in patch set 3 12/11/22, 22:40
-
core-ci voted on patch set 2 V -1 12/11/22, 22:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34886
-
core-ci voted on patch set 3 V -1 12/11/22, 22:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34887
-
Christoph Lehmann uploaded patch set 4
V -112/11/22, 22:55 -
core-ci voted on patch set 4 V +1 12/11/22, 23:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34888
-
Christoph Lehmann updated the commit message in patch set 5
V +112/12/22, 17:27 -
core-ci voted on patch set 5 V +1 12/12/22, 17:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34934
-
Christoph Lehmann updated the commit message in patch set 6
V +112/12/22, 17:37 -
core-ci voted on patch set 6 V +1 12/12/22, 17:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34935
-
Benni Mack commented on patch set 6 12/14/22, 20:43
I actually wondered if we should add the cachebuster to ALL files (CSS, JS, even images from the local storage). -
Christoph Lehmann commented on patch set 6 12/15/22, 08:33
Reply
I also come to the conclusion, that the cachebuster ist useful for CSS/JS files, but the, lets say normal case, fonts are included in CSS files. There the cachebuster must match the cachebuster added by versionedResourceUri. Not easy to resolve in a "for all working" manner. So the suggested approach by (also) extending getTexts 'file:' with handling `EXT:` would make the feature "round". -
Benni Mack commented on patch set 6 02/02/23, 13:08
how about just "uri:" or "asset:". IMHO it should always be versionnumbered. -
Christoph Lehmann rebased onto patch set 7
V +104/21/23, 19:19 -
core-ci voted on patch set 7 V +1 04/21/23, 19:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41063
-
Christoph Lehmann uploaded patch set 8
V +104/21/23, 22:31 -
core-ci voted on patch set 8 V -1 04/21/23, 22:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41066
-
Christoph Lehmann uploaded patch set 9
V -104/22/23, 09:34 -
Christoph Lehmann updated the commit message in patch set 10 04/22/23, 09:35
-
core-ci voted on patch set 9 V +1 04/22/23, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41085
-
core-ci voted on patch set 10 V +1 04/22/23, 09:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41086
-
Stefan Bürk updated the commit message in patch set 11
V +104/22/23, 15:16 -
core-ci voted on patch set 11 V +1 04/22/23, 15:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41091
-
Christoph Lehmann updated the commit message in patch set 12
V +104/22/23, 20:57 -
core-ci voted on patch set 12 V +1 04/22/23, 21:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41092
-
Oliver Hader commented on patch set 12 04/23/23, 07:26
ResourceViewHelper.php:95I'm not sure whether the version number should be applied explicitly here (e.g. by introducing a new argument to this Fluid view helper)...ContentObjectRendererTest.php:1666File operations either should be done via `vfs://` or in a functional testContentObjectRendererTest.php:1668Does it still exist, according to https://docs.typo3.org/c/typo3/cms-core/main/en-us//Changelog/12.3/Deprecation-99810-VersionNumberedFilenameOptionNowBoolean.html it's `bool` since v12.3 -
Christoph Lehmann uploaded patch set 13
V +104/23/23, 18:44 -
core-ci voted on patch set 13 V +1 04/23/23, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41102
-
Oliver Klee commented on patch set 13 04/23/23, 19:17
ContentObjectRendererTest.php:1666ReplyWe're moving away from vfsStream in the Core tests. So this needs to go into a functional test. -
Christoph Lehmann commented on patch set 13 04/23/23, 19:53
ResourceViewHelper.php:95ReplyFrom my point of view it works well with CSS/JS and is just missing for other extension resources. Talk in slack?ContentObjectRendererTest.php:1666ReplyMoved to functional test.ContentObjectRendererTest.php:1668ReplyDone -
Christoph Lehmann rebased onto patch set 14
V +106/16/23, 20:47 -
core-ci voted on patch set 14 V +1 06/16/23, 20:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42755
-
Oliver Klee commented on patch set 14 06/16/23, 21:51
ContentObjectRenderer.php:3933`GeneralUtility::getFileAbsFileName` always returns a string. So we should use a type-safe string comparison instead: ```php if ($absoluteFilePath === '') { ```ContentObjectRenderer.php:3934Please let's always use a more specific exception class. This allows catching a specific exception possible. In this case, maybe a `RuntimeException` would make sense. Also, I propose adding the requested asset path to the exception message to help hunting down problems: ```php throw new RuntimeException('Asset " . $key . " not found', 1670713983); ``` What do you think?ContentObjectRendererTest.php:681In this case, the test name already contains all information about the expected behavior (which I really like!). So this comment is not needed.ContentObjectRendererTest.php:702I'm not really comfortable changing/adding files in our normal resources directory, Is there some way we could move this to typo3temp or something similar?ContentObjectRendererTest.php:705Please always let's make tests as strict as possible. In this case, I'd propose using the stricter `assertSame`: ``` self::assertSame( ```ContentObjectRendererTest.php:709The `unlink` should go into `tearDown`. Otherwise, if there is a test failure (which PHPUnit implements as an exception), the test is exited, and the `unlink` is never called. -
Christoph Lehmann uploaded patch set 15
V +107/07/23, 20:56 -
Christoph Lehmann uploaded patch set 16 07/07/23, 20:58
-
Christoph Lehmann commented on patch set 15 07/07/23, 20:59
ContentObjectRenderer.php:3933ReplyDoneContentObjectRenderer.php:3934ReplyDoneContentObjectRendererTest.php:681ReplyDoneContentObjectRendererTest.php:702ReplyIts now in typo3temp/var/tests/..ContentObjectRendererTest.php:705ReplyDoneContentObjectRendererTest.php:709ReplyDone -
core-ci voted on patch set 15 V -1 07/07/23, 21:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43926
-
core-ci voted on patch set 16 V -1 07/07/23, 21:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43927
-
Georg Ringer commented on patch set 16 07/08/23, 05:35
shouldn't this a feature? -
Benni Mack commented on patch set 16 01/04/24, 14:50
can you resolve the merge conflicts and make it a feature? since it adds a new getText property "asset" we need to document this. -
Oliver Klee commented on patch set 16 01/04/24, 15:00
ContentObjectRendererTest.php:84Usually, the `parent::tearDown()` call should come last (to be symmetric to the `parent::setUp()` call coming first). -
Christoph Lehmann uploaded patch set 17
V -101/04/24, 21:00 -
Christoph Lehmann uploaded patch set 18 01/04/24, 21:01
-
core-ci voted on patch set 17 V +1 01/04/24, 21:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51117
-
core-ci voted on patch set 18 V +1 01/04/24, 21:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51118
-
Christoph Lehmann commented on patch set 18 01/04/24, 21:13
Reply
Thanks for the ping. doneContentObjectRendererTest.php:84ReplyDone -
Christoph Lehmann updated the commit message in patch set 19
V +101/04/24, 21:58 -
core-ci voted on patch set 19 V +1 01/04/24, 22:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51119
-
Chris Müller commented on patch set 19 01/05/24, 06:40
Feature-99203-StreamlineFEversionNumberInFilenameToEXTResources.rst:22Can you give an example of the output? It is "Extension.123456789.svg" (which the needs adjustment in htdocs) or "Extension.svg?123456789". I assume it depends on the configuration? This also explains to the reader what cache-busted means.Feature-99203-StreamlineFEversionNumberInFilenameToEXTResources.rst:34So, when the FE flag is enabled the resource vh always returns a cache-busted URL? -
Christoph Lehmann updated the commit message in patch set 20
V +101/17/24, 12:11 -
Christoph Lehmann commented on patch set 20 01/17/24, 12:15
Feature-99203-StreamlineFEversionNumberInFilenameToEXTResources.rst:22ReplyI added an example. The variant with the cache buster in filename instead as query string is explained in the docs see FE/versionNumberInFilename. For this commit .htaccess adjustments are not nessesary.Feature-99203-StreamlineFEversionNumberInFilenameToEXTResources.rst:34ReplyYes. Added it as impact. -
core-ci voted on patch set 20 V +1 01/17/24, 12:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51680
-
Christoph Lehmann uploaded patch set 21
V +101/17/24, 12:19 -
Christoph Lehmann commented on patch set 21 01/17/24, 12:19
rebased -
core-ci voted on patch set 21 V +1 01/17/24, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51681
-
Christoph Lehmann uploaded patch set 22
V +101/29/24, 18:55 -
Christoph Lehmann commented on patch set 22 01/29/24, 18:56
Rebased again to resolve merge conflicts. -
core-ci voted on patch set 22 V -1 01/29/24, 19:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52458
-
Chris Müller uploaded patch set 23
V -101/30/24, 18:57
-
core-ci voted on patch set 23 V -1 01/30/24, 19:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52508
-
Christoph Lehmann uploaded patch set 24
V -102/27/24, 18:49 -
core-ci voted on patch set 24 V -1 02/27/24, 18:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53660
-
Christoph Lehmann uploaded patch set 25
V -102/27/24, 18:55 -
core-ci voted on patch set 25 V +1 02/27/24, 19:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53661
-
Chris Müller uploaded patch set 26
V +102/28/24, 20:26 -
Chris Müller uploaded patch set 27 02/28/24, 20:27
-
core-ci voted on patch set 26 V +1 02/28/24, 20:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53694
-
core-ci voted on patch set 27 V +1 02/28/24, 20:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53695
-
Benni Mack commented on patch set 27 03/04/24, 09:48
ResourceViewHelper.php:100OK. I found out that some people might use this result for other further usages. How about we add a new argument "useCacheBusting" which - if not explicitly set, uses the createVersionNumberedFilename(), and can be disabled if necessary by setting <f:resource ... useCacheBusting="false" /> ? -
Christoph Lehmann uploaded patch set 28
V +103/04/24, 19:42 -
Christoph Lehmann commented on patch set 28 03/04/24, 19:43
ResourceViewHelper.php:100ReplyDone -
core-ci voted on patch set 28 V -1 03/04/24, 19:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53902
-
Christoph Lehmann rebased onto patch set 29
V -103/04/24, 21:44 -
core-ci voted on patch set 29 V +1 03/04/24, 21:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/53908
-
Benni Mack commented on patch set 30
V +105/03/24, 19:26Published edit on patch set 29. -
core-ci voted on patch set 30 V +1 05/03/24, 19:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57176
-
Simon Schaufelberger voted on patch set 30 CR +1 V +1 05/04/24, 00:29
-
Guido Schmechel commented on patch set 30 05/04/24, 18:10
typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml Should the description for versionNumberInFilename be adapted slightly? Irrespective of this, the feature has also been successfully tested. -
Christoph Lehmann commented on patch set 30 05/06/24, 19:13
I think, after two years, this one could be merged, or? :-)Reply
What should be added? (Please feel free to do it) -
Josef Glatz voted on patch set 30 CR +1 05/07/24, 04:36
-
Josef Glatz voted on patch set 30 V +1 05/07/24, 05:07
-
Josef Glatz commented on patch set 30 05/07/24, 05:10
I find the new getText option "asset" really straightforward (from a naming perspective and usage perspective) The new ViewHelper argument is awesome anyway -
Benni Mack voted on patch set 30 CR +2 V +2 06/14/24, 13:04
-
Benni Mack merged patch set 31 06/14/24, 13:04