#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