#107260Introduce mutable TCA Schema for FormEngine with backwards compatibility to processedTca
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.
- 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.
- Implement a mutable variant of the TCA Schema API.
- Replace
processedTcausage in FormEngine with the mutable schema. - Implement a BC layer that synchronises changes between the mutable schema and
processedTcaafter each DataProvider execution. - Ensure all existing DataProviders (core and extension) continue to function without modification.
Reviews 5
- main 92838[FEATURE] Add FormInstructionSchema to FormEngine
- main 93343[BUGFIX] Provide tcaSchemata in FilesControlContainerTest
- main 93313[BUGFIX] Fix site_language icons in site config
- main 93145[TASK] Add TCA and schema as state to FormEngine $result
- main 92819[TASK] Replace $GLOBALS['TCA'] with schema api in formengine
Related issues 2
History 6
-
Christian Kuhn commented <span data-processor="relativetime" data-value="2025-08-13T18:44:00+00:00" > 08/13/25, 18:44 </span>
-
Bastien Lutz changed Related to #108915 <span data-processor="relativetime" data-value="2026-02-23T07:58:32+00:00" > 02/23/26, 07:58 </span>
-
Bastien Lutz changed status
NewIn Progress assigned to Bastien Lutz done0 %60 % <span data-processor="relativetime" data-value="2026-02-23T07:58:58+00:00" > 02/23/26, 07:58 </span> -
Georg Ringer changed Related to #109315 <span data-processor="relativetime" data-value="2026-03-22T20:26:14+00:00" > 03/22/26, 20:26 </span>
-
Christian Kuhn commented and changed status
In ProgressResolved <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.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-03-31T09:00:41+00:00" > 03/31/26, 09:00 </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?