Review main Merged

90958[TASK] Add verbose console to improve help text for cache:flush

Lina Wolf CR +2 V +2 Easy +22 −3 updated 11/05/25, 13:45

Commit message

When executing `cache:flush`, there was previously no console
feedback indicating the result of the operation. This change
introduces clear and consistent output messages using SymfonyStyle
when --verbose or -v is attached.

Error messages, including those provided by events, are always displayed.

Additionally, the command description and help text have been improved
for clarity and consistency.

These changes improve the developer and DevOps experience by making
command-line operations more transparent and self-explanatory.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 3644

Show 1519 earlier messages
  1. Lina Wolf uploaded patch set 1 10/09/25, 05:46

  2. core-ci voted on patch set 1 V +1 10/09/25, 05:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86272

  3. Lina Wolf uploaded patch set 2 V +1 10/09/25, 05:57

  4. core-ci voted on patch set 2 V +1 10/09/25, 06:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86273

  5. Garvin Hicking commented on patch set 2 10/09/25, 06:18

    Since this command is used in deployments and by system tasks I'm a bit afraid a stdout here could cause issues in pipelines and other places that might expect "no output". Not sure if "disturbing" this with an unneeded feedback is helpful. how about utilizing the "-v" option instead to opt-in into getting output, and not by default?
  6. Lina Wolf commented on patch set 2 10/09/25, 07:21

    Automatic scripts that want not IO can and should use the parameter -n for no interaction. It is possible to set on any command. However these texts contain no interaction.
  7. Oli Bartsch commented on patch set 2 10/09/25, 07:33

    Reply

    +1 for output only on verbose.
  8. Lina Wolf uploaded patch set 3 V +1 10/09/25, 07:46

  9. Lina Wolf commented on patch set 3 10/09/25, 07:47

    How would you feel about disabling output on non-interactive usage and limiting detailed error display to the verbose level?
  10. core-ci voted on patch set 3 V +1 10/09/25, 07:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86278

  11. Garvin Hicking commented on patch set 3 10/09/25, 08:26

    Reply

    My oppinion: I think all people only use "cache:flush" and not "cache:flush -n", so that would still be a change of behaviour for them. I think this is verbose output, and should be triggered on the "-v" option. IMO interaction is not related to having this output or not.
  12. Lina Wolf commented on patch set 3 10/09/25, 08:57

    Reply

    I would argue that those who need a feedback most - mostly new developers and unexperienced DevOps will not see it if hidden behind a --verbose parameter. On the other automatic tools that do not want or expect stdoutput should use the --no-interaction parameter with any call to any command. It should be humans first and tools second...
  13. Mathias Brodala commented on patch set 3 10/09/25, 08:59

    Reply

    … and Symfony Console automatically detects non-interactive environments (no TTY), so this could indeed be a suitable flag.
  14. Garvin Hicking commented on patch set 3 10/09/25, 10:36

    Reply

    (resolving, see other "thread")

    Reply

    Sure; I don't mind too much, I just wanted to bring this up. Not blocking, so I'm resolving this.
  15. Mathias Brodala commented on patch set 3 10/09/25, 10:39

    CacheFlushCommand.php:89

    IMO the errors should be outputted right away. After all there is no guarantee that the same errors occur again if you retry the command with --verbose.

    CacheFlushCommand.php:90

    $error please, we are in PHP, not C. ;-)
  16. Lina Wolf uploaded patch set 4 V +1 10/10/25, 10:56

  17. Lina Wolf commented on patch set 4 10/10/25, 10:56

    CacheFlushCommand.php:89 Reply

    Done

    CacheFlushCommand.php:90 Reply

    Done
  18. core-ci voted on patch set 4 V +1 10/10/25, 11:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86393

  19. Lina Wolf uploaded patch set 5 V +1 10/10/25, 11:12

  1. core-ci voted on patch set 5 V +1 10/10/25, 11:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86394

  2. Christian Kuhn commented on patch set 5 CR -1 10/10/25, 15:11

    i prefer to not pollute my shell with output on success for fire&forget commands. note a -1 is no blocker: according to the rules, a merge is still allowed if the overall sum is still two +1 votes after subtracting -1, plus if you find a core merger willing to merge. still i want my -1 to be documented in this case if merged, so please ping if the change is re-pushed and the default success message is kept so i can re-apply it.
  3. Lina Wolf uploaded patch set 6 CR -1 V +1 10/10/25, 15:48

  4. Lina Wolf commented on patch set 6 10/10/25, 15:51

    Reply

    I just pushed a different proposal 17:49 Uhr success message when you use -v, error message unless you use -q
  5. core-ci voted on patch set 6 V +1 10/10/25, 16:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/86419

  6. Georg Ringer voted on patch set 6 CR +1 V +1 10/20/25, 15:52

  7. Riccardo De Contardi commented on patch set 6 V +1 10/20/25, 15:55

    tested with -v option
  8. Lina Wolf updated the commit message in patch set 7 CR +1 V +1 10/21/25, 04:14

  9. core-ci voted on patch set 7 V +1 10/21/25, 04:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87127

  10. Georg Ringer voted on patch set 7 CR +1 V +1 10/21/25, 14:06

  11. Riccardo De Contardi commented on patch set 7 V +1 10/21/25, 14:31

    verified with -v option
  12. Lina Wolf commented on patch set 7 10/22/25, 13:26

    Reply

    @lolli@schwarzbu.ch can this be resolved? There is no success message anymore unless you use -v
  13. Benni Mack commented on patch set 7 10/26/25, 14:03

    Chiming in late here... there is/was a lot of discussions around this topic, and I am fine either way, but I wonder if we will a) streamline the output of all CLI commands (such as scheduler:run, cache:warmup, redirects:cleanup etc) b) document such consistenty somewhere as coding guidelines ? Otherwise we end up changing it after discussions, and then 1 year later, somebody else changes it back again.
  14. Lina Wolf commented on patch set 7 10/26/25, 14:31

    Reply

    Yes I was planning on streamlining the CLI commands once we are able to reach a consent on what is a coding guideline for this. In https://typo3.slack.com/archives/C027S88NY/p1760077947273789 Frank suggested to base on https://clig.dev/ however, lolli was opposed to having a success output by default, as clig.dev would suggest. So we could of course also make our own coding guideline or pick another one.
  15. Christian Kuhn commented on patch set 7 10/28/25, 09:50

    there is no *one ring to rule them all*. some other cli commands *may* be useful to return output by default, like obviously the interactive ones. in case of cache:flush however, which is the topic here, no output by default is the only acceptable option. since that is the current version, i will +2 this now.
  16. Christian Kuhn voted on patch set 7 CR +2 10/28/25, 09:50

  17. Christian Kuhn voted on patch set 7 CR +1 V +1 10/28/25, 09:58

  18. Christian Kuhn commented on patch set 7 10/28/25, 09:59

    Reply

    +2 is too harsh with the current discussion in mind, so a strong +1 from me on this for now.
  19. Garvin Hicking commented on patch set 7 CR +1 V +1 10/28/25, 14:47

    Reply

    Done
    (can me merged from my pov, but am on the go)
  20. Christian Kuhn uploaded patch set 8 CR +1 V +1 11/04/25, 11:54

  21. Christian Kuhn voted on patch set 8 CR +1 V +1 11/04/25, 11:54

  22. core-ci voted on patch set 8 V +1 11/04/25, 12:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88458

  23. Garvin Hicking voted on patch set 8 CR +1 V +1 11/04/25, 12:17

  24. Christian Kuhn voted on patch set 8 CR +2 V +2 11/05/25, 13:45

  25. Christian Kuhn merged patch set 9 11/05/25, 13:45