Review main Merged

93094[BUGFIX] Move #[RateLimit] and #[Authorize] resolution to compile time

Benni Mack CR +2 V +2 Hard +289 −59 updated 03/13/26, 12:54

Commit message

The #[RateLimit] and #[Authorize] attributes on extbase controller
actions were previously resolved at runtime via the Extbase
ReflectionService and ClassSchema. This migrates both to dedicated
CompilerPass implementations (RateLimitPass, AuthorizePass) that
scan action controllers at container build time and populate
registries (RateLimitRegistry, AuthorizeRegistry).

The registries also absorb the related services previously injected
directly into ActionController: RateLimiterFactoryInterface is now
encapsulated in RateLimitRegistry, and ActionAuthorizationService
in AuthorizeRegistry.

This aligns with how the rest of TYPO3 Core handles attribute-based
metadata (e.g. ListenerProviderPass for #[AsEventListener]) and is
a first step toward reducing Extbase's runtime ReflectionService
usage.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Torben Hansen +1
    • core-ci +1 CI

Issues 1

Files 8

Review log 1215

  1. Benni Mack uploaded patch set 1 03/05/26, 20:51

  2. core-ci voted on patch set 1 V +1 03/05/26, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97438

  3. Benni Mack updated the commit message in patch set 2 V +1 03/12/26, 07:46

  4. Benni Mack marked it ready for review 03/12/26, 07:46

  5. core-ci voted on patch set 2 V +1 03/12/26, 07:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97797

  6. Andreas Kienast commented on patch set 2 03/12/26, 08:58

    AuthorizePass.php:31

    Class can be made `readonly`.

    RateLimitPass.php:31

    Class can be made `readonly`.
  7. Stefan Bürk uploaded patch set 3 V +1 03/12/26, 12:37

  8. Stefan Bürk commented on patch set 3 03/12/26, 12:37

    AuthorizePass.php:31 Reply

    Done

    RateLimitPass.php:31 Reply

    Done
  9. core-ci voted on patch set 3 V +1 03/12/26, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97827

  10. Garvin Hicking commented on patch set 3 03/12/26, 21:35

    I'd rather label this as [TASK], yes?
  11. Torben Hansen voted on patch set 3 V +1 03/13/26, 07:03

  12. Stefan Bürk voted on patch set 3 CR +1 V +1 03/13/26, 09:58

  13. Garvin Hicking commented on patch set 3 CR +1 V +1 03/13/26, 12:36

    Thanks for this effort. When reviewing both attribute-based patches I was already thinking about if runtime-analysis is the best thing, but then I thought it falls in line with the current process. But this approach is superior and paves a good way forward.
  14. Stefan Bürk voted on patch set 3 CR +2 V +2 03/13/26, 12:54

  15. Stefan Bürk merged patch set 4 03/13/26, 12:54