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 5 years ago. Updated over 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 #1

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

Actions #2

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

Actions #3

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

Actions

Also available in: Atom PDF