Review main Merged

88418[BUGFIX] Improve exception handling for incorrect YAML syntax

Lina Wolf CR +2 V +2 Normal +52 −3 updated 03/04/25, 12:45

Commit message

When a site config.yaml file contains a syntax error, it currently triggers
a `\Symfony\Component\Yaml\Exception\ParseException`. This change ensures
that a `\TYPO3\CMS\Core\Configuration\Loader\Exception\YamlParseException`
is thrown instead, providing context on which YAML file contains the error.

Additionally, the TYPO3 exception includes a link to the documentation,
allowing integrators to access relevant help more easily.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Mathias Brodala +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Garvin Hicking +1
    • Mathias Brodala +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1216

  1. Lina Wolf uploaded patch set 1 03/01/25, 08:20

  2. core-ci voted on patch set 1 V -1 03/01/25, 08:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74941

  3. Lina Wolf uploaded patch set 2 V -1 03/01/25, 08:33

  4. core-ci voted on patch set 2 V -1 03/01/25, 08:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74942

  5. Lina Wolf uploaded patch set 3 V -1 03/01/25, 11:09

  6. core-ci voted on patch set 3 V +1 03/01/25, 11:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74943

  7. Garvin Hicking commented on patch set 3 CR +1 V +1 03/01/25, 12:42

    You refer to the "normal" exception wiki-style docs, right?
  8. Lina Wolf commented on patch set 3 03/01/25, 13:42

    Reply

    Yes
  9. Mathias Brodala commented on patch set 3 03/03/25, 07:48

    YamlFileLoader.php:82

    I know the wording is just a copy from below but it does not make any sense. One does not "parse something into syntax". Better wording: > YAML file "..." has syntax errors: ...
  10. Lina Wolf commented on patch set 4 CR +1 V +1 03/03/25, 07:52

    Published edit on patch set 3.
  11. Lina Wolf commented on patch set 4 03/03/25, 07:52

    YamlFileLoader.php:82 Reply

    I changed the text of both error messages.
  12. Mathias Brodala voted on patch set 4 CR +1 V +1 03/03/25, 07:53

  13. core-ci voted on patch set 4 V +1 03/03/25, 07:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74991

  14. Garvin Hicking voted on patch set 4 CR +1 V +1 03/03/25, 08:03

  15. Benjamin Franzke voted on patch set 4 CR +2 V +2 03/04/25, 12:37

  16. Benjamin Franzke merged patch set 5 03/04/25, 12:45