Issue Task Closed

#107260Introduce mutable TCA Schema for FormEngine with backwards compatibility to processedTca

Oliver Bartsch 08/11/25, 20:43 updated 03/31/26, 09:00

Description

With TYPO3 v13 and v14, the new TCA Schema API has been introduced. In the meantime, we have replaced $GLOBALS['TCA'] in nearly all areas. The last remaining part still relying heavily on $GLOBALS['TCA'] is the FormEngine.

The main challenge is that the current TCA Schema is a read-only API. FormEngine – especially its DataProviders – requires a mutable TCA Schema that can be adjusted during processing.

Additionally, to maintain backwards compatibility, we need a mechanism to keep the legacy processedTca array in sync with the mutable TCA Schema during the FormEngine build process.

Details:

Introduce a mutable TCA Schema implementation to be used by FormEngine and its DataProviders.
This mutable TCA Schema will replace processedTca as the internal working copy during form rendering.
For backwards compatibility, after each DataProvider execution (which may modify the schema), any changes must be synced back to the legacy processedTca.

*This sync must work bidirectionally:*
If the mutable TCA Schema is changed, the equivalent change is reflected in processedTca. If a DataProvider modifies processedTca directly, the mutable TCA Schema must also be updated accordingly. This ensures that all extensions and legacy code relying on processedTca continue to work during the transition period.

Benefits:
  • Completes the migration away from $GLOBALS['TCA'] for all backend areas.
  • Allows FormEngine and DataProviders to benefit from the structured and validated TCA Schema API.
  • Maintains full backwards compatibility for extensions still working with processedTca.
Scope of this issue:
  • Implement a mutable variant of the TCA Schema API.
  • Replace processedTca usage in FormEngine with the mutable schema.
  • Implement a BC layer that synchronises changes between the mutable schema and processedTca after each DataProvider execution.
  • Ensure all existing DataProviders (core and extension) continue to function without modification.

Reviews 5

History 6

  1. Christian Kuhn commented <span data-processor="relativetime" data-value="2025-08-13T18:44:00+00:00" > 08/13/25, 18:44 </span>

    unsure on this.

    TCA in formEngine is kinda ‘abused’ heavily and carries tons of data that is not ‘pristine’ TCA anymore, after data providers were run.

    An alternative is to your idea is fully keep it that way: have something like ‘getFullTcaArray’ from schema, which basically return the array again, put that into the data array as base and operate on that to store data, similar to before. additionally, single data providers can work with injected schema directly to use capabilities and so on, but write to he array as before.

    there are only a few places that access globals[‘tca’], and i think getting rid of these only should be possible.

    having a full ‘mutable’ api in tcaSchema kinda defeats the main design pattern of that structure, and adds quite a bit of abstracted overhead, so i’m reluctant to follow that path.

    what do you think? should we have a talk about this?

  2. Bastien Lutz changed status New In Progress assigned to Bastien Lutz done 0 % 60 % <span data-processor="relativetime" data-value="2026-02-23T07:58:58+00:00" > 02/23/26, 07:58 </span>

  3. Christian Kuhn commented and changed status In Progress Resolved <span data-processor="relativetime" data-value="2026-03-24T12:25:21+00:00" > 03/24/26, 12:25 </span>

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/93145 should have been attached here, but we missed a proper Releases line in its commit message. The change took care $globals[‘tca’] is no longer directly used in formEngine. processedTca is a second topic, i suggest we create a fresh issue for this when work continues.