Review main Merged

92500[FEATURE] Console command to analyse Fluid templates

Simon Praetorius CR +2 V +2 Hard +269 −11 updated 01/25/26, 14:02

Commit message

A new console command is introduced, which can be used to discover
errors and deprecations in Fluid templates. In its initial
implementation, no configuration or CLI arguments are offered to
keep things simple. This might be added in follow-up patches.

The ReST file includes instructions to how ViewHelpers or ViewHelper
arguments should be deprecated to be able to detect them using the
new console command.

Note that the same code is also executed during `fluid:cache:warmup`,
however the new command avoids the "side effect" of warming up the
cache, so it can be used e. g. in CI pipelines.

Verbose output allows to get feedback of analyzed templates
and the number of errors/deprecations (or success). The
'fluid:cache:warmup' command has been adapted similarly
for consistency.

Review

  • Code review CR +2 Done
    • Simon Praetorius +2
    • Garvin Hicking +1
    • Guido Schmechel +1
  • Verified V +2 Done
    • Simon Praetorius +2
    • Garvin Hicking +1
    • Guido Schmechel +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 1824

  1. Simon Praetorius uploaded patch set 1 01/25/26, 10:03

  2. core-ci voted on patch set 1 V +1 01/25/26, 10:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94298

  3. Garvin Hicking commented on patch set 1 01/25/26, 10:18

    AnalyseCommand.php:38

    👍 for the alias :)
  4. Simon Praetorius uploaded patch set 2 V +1 01/25/26, 10:47

  5. core-ci voted on patch set 2 V +1 01/25/26, 10:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94302

  6. Anja Leichsenring voted on patch set 2 CR +1 V +1 01/25/26, 11:02

  7. Guido Schmechel commented on patch set 2 01/25/26, 11:15

    The following test ran on my system: - Unknown ViewHelper f:variable2 was marked as an error The following test did not work for me: This code was added to typo3/sysext/fluid_styled_content/Resources/Private/Templates/Table.fluid.html: <f:variable name="_blubb">Test</f:variable> <f:variable name="_temp" value="a temporary value" /> This was not recognised: "[OK] 506 analysed templates without errors or deprecations" Since I don't know if I have misunderstood something here, I won't give it a -1.
  8. Simon Praetorius commented on patch set 2 01/25/26, 11:20

    Reply

    Variables are recognized on access, not on definition. Could you try `{_temp}`?
  9. Garvin Hicking commented on patch set 2 CR -1 01/25/26, 11:36

    on it for a small verbose addition
  10. Guido Schmechel commented on patch set 2 01/25/26, 11:39

    Reply

    Perfect. Thank you for clarifying :-)
  11. Garvin Hicking uploaded patch set 3 CR +1 V +1 01/25/26, 11:48

  12. core-ci voted on patch set 3 V +1 01/25/26, 11:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94309

  13. Garvin Hicking uploaded patch set 4 V +1 01/25/26, 12:02

  14. Garvin Hicking uploaded patch set 5 01/25/26, 12:03

  15. core-ci voted on patch set 4 V +1 01/25/26, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94310

  16. core-ci voted on patch set 5 V +1 01/25/26, 12:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94311

  17. Simon Praetorius uploaded patch set 6 V +1 01/25/26, 12:20

  18. Simon Praetorius commented on patch set 5 01/25/26, 12:20

    Reply

    Done
  19. Garvin Hicking commented on patch set 5 CR +1 V +1 01/25/26, 12:20

    Reply

    Done
  20. core-ci voted on patch set 6 V +1 01/25/26, 12:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94312

  21. Garvin Hicking voted on patch set 6 CR +1 V +1 01/25/26, 12:46

  22. Guido Schmechel voted on patch set 6 CR +1 V +1 01/25/26, 12:57

  23. Simon Praetorius voted on patch set 6 CR +2 V +2 01/25/26, 14:02

  24. Simon Praetorius merged patch set 7 01/25/26, 14:02