Task #88944
closedCast or convert TCA array elements to bool, int or float (before write to cache)
0%
Description
As TCA is a php array, there is no type safety by default. If there is a need to use a value of the $GLOBALS['TCA']
, there must be a type convert or cast before you can use it.
Type safety in general become more important in php especially after the introduction of type hints for scalar method parameters.
In order to force the use of the fitting type, the TCA values should be converted to the needed type via TcaMigration. It also allows informing extension developers how to adjust the used TCA.
The goal of this change is not to create a context sensitive validation of the given TCA configuration. It is meant to address common issues as pseudo booleans like 'exclude' => 1
or pseudo integer values like 'cols' => '40'
.
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61484
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61484
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Rejected
I'll abandon this change for the time being, as there was no movement in the past 5 months. We can re-visit this approach again if anyone is up for it