Review main Merged

79060[BUGFIX] Make symfony console handle exceptions again

Torben Hansen CR +2 V +2 Easy +0 −1 updated 06/27/23, 05:02

Commit message

With #99912 it has been configured that exceptions in CLI context
are not catched any more by symfony console. This change however
has the following downsides:

* CLI now throws all exceptions, which does not look pretty
* Possible user errors (e.g. unknown command or invalid amount of
  arguments) are also thrown as exception and are now logged to
  the TYPO3 log including sys_log
* Symfony command auto-suggestion for commands does not work any more

This patch therefore reverts the change made in #99912 to restore
the original functionality.

Applications requiring to process exceptions thrown by CLI commands
should implement an event listen for the `ConsoleErrorEvent`.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Christoph Lehmann +1
  • Verified V +2 Done
    • Benni Mack +2
    • Christoph Lehmann +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 913

  1. Torben Hansen uploaded patch set 1 05/16/23, 18:06

  2. Torben Hansen updated the commit message in patch set 2 05/16/23, 18:08

  3. Torben Hansen rebased onto patch set 3 05/16/23, 18:08

  4. Torben Hansen updated the commit message in patch set 4 05/16/23, 18:09

  5. core-ci voted on patch set 1 V +1 05/16/23, 18:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41872

  6. core-ci voted on patch set 3 V +1 05/16/23, 18:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41874

  7. core-ci voted on patch set 4 V +1 05/16/23, 18:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41875

  8. core-ci voted on patch set 2 V +1 05/16/23, 18:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41873

  9. Benni Mack voted on patch set 4 V +1 CR +1 05/16/23, 21:56

  10. Christoph Lehmann voted on patch set 4 V +1 CR +1 05/17/23, 07:01

  11. Benni Mack voted on patch set 4 V +2 CR +2 05/17/23, 07:20

  12. Benni Mack merged patch set 5 05/17/23, 07:20

  13. Stefan Bürk commented on patch set 5 06/27/23, 05:02

    12.4 backport: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79074 Seems that something with the changeid went wrong.