Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Quiet Breaking

95729[!!!][TASK] Throw exception if YAML file does not exist

Simon Schaufelberger CR 0 V 0 Normal +174 −28 updated 10/29/26, 07:16

Commit message

If a YAML file, or a file referenced in its imports, does not exist, the
YAML file loader now throws an exception instead of only logging the
error and skipping the import. The error log is not the first place an
extension developer checks, and a partially loaded configuration is hard
to debug, especially during an upgrade.

Syntax errors in imported files and imports outside of the project
folder are no longer skipped either.

Imports from an extension that is not loaded are still skipped, as
introduced with #88993, but now logged as a warning. This keeps optional
imports working, e.g. the RTE presets of EXT:form importing
EXT:rte_ckeditor configuration.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 6
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/29/95729/6 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/29/95729/6 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Issues 2

Files 5

Review log 2329

Show 34 earlier messages
  1. Simon Schaufelberger uploaded patch set 1 09/08/26, 14:22

  2. core-ci voted on patch set 1 V -1 09/08/26, 14:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108099

  3. Simon Schaufelberger uploaded patch set 2 V -1 09/08/26, 14:42

  4. Oliver Klee updated the commit message in patch set 3 09/08/26, 14:48

  1. core-ci voted on patch set 2 V +1 09/08/26, 14:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108100

  2. core-ci voted on patch set 3 V +1 09/08/26, 14:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108101

  3. Josua Vogel uploaded patch set 4 V +1 09/24/26, 14:26

  4. Josua Vogel voted on patch set 4 CR +1 V +1 09/24/26, 14:26

  5. Simon Schaufelberger commented on patch set 4 V -1 09/24/26, 14:32

    YamlFileLoader.php:124

    @j.vogel97@web.de the exception code must be unique but is used twice
  6. core-ci voted on patch set 4 V -1 09/24/26, 14:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109166

  7. Josua Vogel uploaded patch set 5 CR +1 V +1 09/24/26, 14:37

  8. core-ci voted on patch set 5 V +1 09/24/26, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109167

  9. Josua Vogel commented on patch set 5 09/24/26, 14:51

    YamlFileLoader.php:124 Reply

    Done
  10. Josua Vogel voted on patch set 5 CR +1 V +1 09/24/26, 14:51

  11. Benni Mack commented on patch set 5 09/24/26, 14:56

    how can I reproduce this? Since we're touching EXT:core this might have implications to other places where we use yaml (site sets etc)
  12. Stefan Bürk commented on patch set 5 09/24/26, 15:01

    Reply

    Beside that - yaml linting should pick that up and part of an upgrade strategy/pipeline anyway - or not ? https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Feature-104973-ActivateLintYamlExecutableForTYPO3.html
  13. Simon Schaufelberger commented on patch set 5 09/24/26, 16:34

    Reply

    in your custom form configuration import a yaml file that doesn't exist. here is my config: `packages/my_extension/Configuration/Form/MySet/config.yaml` ``` name: vendor/base-form-set label: 'My Form Set' priority: 100 imports: - { resource: './doesnotexist.yaml' } ```
  14. Simon Schaufelberger commented on patch set 5 09/24/26, 16:36

    Reply

    also import an existing yaml and inside that (nested) require a nonexisting yaml.
  15. Simon Schaufelberger commented on patch set 5 09/24/26, 22:38

    Reply

    @stefan@buerk.tech no, that command does not find invalid imports.
  16. Josua Vogel commented on patch set 5 10/07/26, 20:27

    Reply

    @benni@typo3.org , @stefan@buerk.tech how to proceed?
  17. Anton Danilov commented on patch set 5 CR -1 10/08/26, 14:14

    This patch reverses the fix for #88993. That change deliberately made a failing YAML import non-fatal. EXT:form shows the impact: with `rte_ckeditor` not installed, rendering a form with a non-empty RTE-enabled field (e.g. a Confirmation finisher message) now throws, where it previously worked. The test edits add the missing dependency to the test instance and thereby hide the regression. Independently, the behaviour change is user-facing and needs a changelog entry.
  18. Simon Schaufelberger commented on patch set 5 10/25/26, 15:34

    Reply

    I had big trouble debugging what is wrong with my yaml configs because nothing was working because i moved files around and then got no error message or exception. I was totally glueless what could be the reason until i had to use xdebug and step through the whole rendering of the yaml files until i found out that the path to one file was wrong. This sucks! If paths are wrong, TYPO3 should tell me. It also does so in TypoScript!
  19. Oliver Klee voted on patch set 5 V +1 10/25/26, 16:07

  20. Josua Vogel commented on patch set 5 CR 0 V 0 10/26/26, 14:26

    Reply

    Both can be met if the loader distinguishes why a file is missing: * File is missing in a loaded extension or at a relative/absolute path: throw, as in this patch. This covers moved files, typos in the path and nested imports. * Import is EXT:<key>/... and <key> is not loaded: keep the #88993 behaviour, i.e. skip the import and log it (as warning, with a hint that the extension is not loaded). What do you think?
  21. Simon Schaufelberger commented on patch set 5 10/26/26, 14:42

    Reply

    that sounds like a good idea!
  22. Josua Vogel uploaded patch set 6 CR -1 V +1 10/29/26, 07:05

  23. Josua Vogel commented on patch set 6 10/29/26, 07:07

    Reply

    Patch set 6 keeps the #88993 behaviour: if an import references an extension that is not loaded (e.g. EXT:rte_ckeditor/... without rte_ckeditor installed), the import is skipped and a warning is logged. All other errors (missing file, syntax error, path outside the project) now throw an exception. I removed rte_ckeditor from the form functional tests again. I added a Breaking changelog entry.
  24. Josua Vogel commented on patch set 6 10/29/26, 07:08

    Reply

    Resolving for now. Let´s discuss the new approach.
  25. core-ci voted on patch set 6 V +1 10/29/26, 07:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112781