Project

General

Profile

Actions

Task #103028

closed

Refactoring DefaultTcaSchema to reduce redundant code

Added by Cyrill Gsell 6 months ago. Updated 15 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2024-02-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
easy
Sprint Focus:

Description

I would like to simplify the TYPO3\CMS\Core\Database\Schema\DefaultTcaSchema class by replacing all the "foreach ($tableDefinition['columns'] as $fieldName => $fieldConfig)" calls with one foreach. I would suggest a mapping class which returns the column type and its options depending on the given tca configuration.

Optional:
  • If wanted I could add an PSR-14 event allowing to override the column type and options with an event listener.

I already have a running prototype, if you think this would be useful I would finish it and update the tests if needed before I push it for a review.

P.S. I created this task to get startet in the TYPO3 contribution by getting to know the whole process.


Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Feature #101553: Auto-create DB fields from TCA columnsIn Progress2023-10-13

Actions
Related to TYPO3 Core - Task #104110: Streamline DefaultTcaSchemaClosed2024-06-14

Actions
Actions

Also available in: Atom PDF