Actions
Task #88944
closedCast or convert TCA array elements to bool, int or float (before write to cache)
Start date:
2019-08-10
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:
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'
.
Actions