Review main Merged

85268[FEATURE] Allow static routes to assets

Georg Ringer CR +2 V +2 Normal +203 −7 updated 07/23/24, 12:15

Commit message

Provide a new type of static routes `assets` to expose assets shipped
by extensions.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 1722

  1. Georg Ringer uploaded patch set 1 07/16/24, 13:51

  2. Georg Ringer commented on patch set 1 07/16/24, 13:51

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 07/16/24, 14:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61642

  4. J. Peter M. Schuler commented on patch set 1 CR +1 07/16/24, 14:44

    Seems much more elegant than my proposed change, uses better wording and thorough tests.
  5. Garvin Hicking commented on patch set 1 07/16/24, 14:50

    I love this. It will be a great addition to https://docs.typo3.org/m/typo3/guide-installation/main/en-us/MigrateToComposer/AssetMigration.html#migration to have this opportunity without requiring any of the more complex suggestions listed there. Hope to be able to test this the next week, but I'm all for having this. I wish I had seen your idea earlier, J. Peter!
  6. Guido Schmechel commented on patch set 1 07/16/24, 15:19

    StaticRouteResolver.php:169

    This is about assets. Do we still have to restrict this to FileTypes that are enabled? What happens if the asset from the configuration is no longer available? Example: The extension is uninstalled.
  7. Georg Ringer commented on patch set 1 07/16/24, 15:33

    StaticRouteResolver.php:169 Reply

    same as when you use an asset which doesn't exist > exception
  8. Benni Mack uploaded patch set 2 CR +1 V +1 07/17/24, 14:43

  9. core-ci voted on patch set 2 V -1 07/17/24, 14:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61699

  10. Benni Mack uploaded patch set 3 V -1 07/17/24, 20:58

  11. core-ci voted on patch set 3 V -1 07/17/24, 21:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61703

  12. Garvin Hicking uploaded patch set 4 V -1 07/18/24, 07:26

    Enhance tests and use real sanitizer for real functionality
  13. core-ci voted on patch set 4 V -1 07/18/24, 07:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61720

  14. core-ci voted on patch set 4 V +1 07/18/24, 07:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61720

  15. Stefan Bürk commented on patch set 4 07/18/24, 08:52

    StaticRouteResolver.php:169 Reply

    I'm not a huge fan of this. Someone may add a "huge videofile" from the extension folder which gets read here (and maybe exceeds memorylimits, blockign services etc). That means, we should at "least" ensure that only images can be assigned as assets (which can be also huge). And make a real statement in the changelog to put the finger on that topic and that it is the responsibility of the admin/integrator to avoid to huge files if configur this. Current state allows everything beneath the extension public resouce folder.
  16. Garvin Hicking commented on patch set 4 07/18/24, 09:04

    StaticRouteResolver.php:169 Reply

    0.0.2: I disagree on "only images": I want JS, CSS, txt, xml, rss, ico, manifest etc - everything that I may want to access with a fixed URL because sometimes you can't use fluid etc to resolve EXT. IMO we should allow everything; huge files can work out, is the integrators task. its not that these routes would be configured by editors...
  17. Benni Mack commented on patch set 4 07/18/24, 09:12

    StaticRouteResolver.php:169 Reply

    @stefan@buerk.tech - I mean, "Someone may add a huge videofile" this can happen - indeed. But only to people who are allowed to modify your site configuration, and if they modify their site configuration they can just break your site because they don't think (or test) their setups properly - that's really up to the integrator.
  18. Georg Ringer commented on patch set 4 07/19/24, 06:32

    as this can only used by system maintainers and not by editors I would be still fine. we have a ton of options how editors can break a site, just by disabling the root site and we don't have warnings there as well
  19. Georg Ringer voted on patch set 4 CR +1 V +1 07/21/24, 07:50

  20. Garvin Hicking voted on patch set 4 CR +1 V +1 07/21/24, 13:58

  21. Benni Mack commented on patch set 4 CR +2 V +2 07/23/24, 12:15

    StaticRouteResolver.php:169 Reply

    Done
  22. Benni Mack merged patch set 5 07/23/24, 12:15