Project

General

Profile

Actions

Task #88944

closed

Cast or convert TCA array elements to bool, int or float (before write to cache)

Added by Daniel Windloff over 4 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Should have
Category:
Code Cleanup
Target version:
-
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

Also available in: Atom PDF