Review 12.4 Merged

79074[BUGFIX] Make symfony console handle exceptions again

Benni Mack CR +2 V +2 Easy +0 −1 updated 06/27/23, 05:05

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
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 2

Files 1

Review log 45

  1. Benni Mack commented on patch set 1 05/17/23, 07:20

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 05/17/23, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41884

  3. Benni Mack voted on patch set 1 V +2 CR +2 05/17/23, 07:30

  4. Benni Mack merged patch set 2 05/17/23, 07:30

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

    Backport of https://review.typo3.org/c/Packages/TYPO3.CMS/+/79060 ChangeId mess-up as it seems.