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

Review main Work in progress Orphaned Breaking

93398[WIP][!!!][FEATURE] Synchronise extension YAML form definitions into database

Josua Vogel CR 0 V -1 Expert +1344 −147 updated 04/21/26, 15:18

Commit message

Extension-provided *.form.yaml files are now mirrored into the
form_definition database table. The database copy is read-only —
the extension file is always the source of truth. This enables
unified queries, permissions, and translations for all forms
regardless of their origin.

Sync logic:
- For each *.form.yaml in registered extension paths:
  - Hash the file content (SHA-256)
  - Look up existing DB record by source_identifier
  - INSERT if not found, UPDATE if hash changed, SKIP if unchanged
- For DB records with a source_identifier whose file no longer
  exists on disk: soft-delete (set deleted=1)
- After sync, tt_content FlexForm references are migrated from
  EXT:... paths to numeric database UIDs

Write protection:
DatabaseStorageAdapter.write() and delete() now throw
PersistenceManagerException when source_identifier is set,
preventing manual edits to synced records.

ExtensionStorageAdapter restructured to sync-only:
- findAll() returns empty (no more duplicate listings)
- write()/delete() always throw (read-only)
- read() resolves to DB copy first, YAML fallback for pre-sync compat
- isAccessible() returns false (not a writable storage)
- getFormManagerOptions() returns empty (no storage location option)
Extension forms appear exclusively via DatabaseStorageAdapter after sync.

DataStructureIdentifierListener resolves legacy EXT: references in
FlexForm to DB UIDs on-the-fly, ensuring finisher overrides and
dropdowns work correctly even before FlexForm XML is rewritten.

All sync operations (add, modify, delete) are recorded in sys_history
via RecordHistoryStore, making changes visible in the standard TYPO3
record history view.

Trigger mechanisms:
- CLI: bin/typo3 form:formdefinition:syncextensions [--extension=x] [--force]
- EventListener on AfterPackageActivationEvent (auto-sync on install)
- Backend button "Sync extension forms" in Form Manager header

New classes:
- ExtensionFormSyncService: Core sync logic with 3-phase process
- ExtensionFormSyncResult: DTO tracking created/updated/skipped/
  deactivated/failed counts and details
- SyncExtensionFormsCommand: CLI command with tabular output
- SyncExtensionFormsOnPackageActivationListener: Auto-sync on
  extension activation

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 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/98/93398/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/98/93398/3 && git cherry-pick FETCH_HEAD

Review

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

Files 13

Review log 69

  1. Josua Vogel uploaded patch set 1 03/27/26, 12:26

  2. Josua Vogel uploaded patch set 2 03/27/26, 12:30

  3. Josua Vogel uploaded patch set 3 03/27/26, 12:44

  4. core-ci voted on patch set 2 V -1 03/27/26, 12:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98865

  5. core-ci voted on patch set 3 V -1 03/27/26, 13:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98867

  6. Garvin Hicking commented on patch set 3 03/27/26, 13:18

    FormManagerController.php:539 Unresolved

    new domain syntax here 😊

    FormManagerController.php:572 Unresolved

    (since exposed via the controller this may need XLIFF localisation)

    FormManagerController.php:583 Unresolved

    I'd use namespace imports here
  7. core-ci voted on patch set 1 V -1 03/27/26, 13:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98863

  8. Garvin Hicking commented on patch set 3 03/27/26, 16:47

  9. Benni Mack marked it work in progress 04/21/26, 15:18