Issue Bug Closed

#106628DataMapperTest::dateValuesAreStoredInUtcInTextDatabaseFields makes no sense anymore

Lina Wolf 04/27/25, 15:44 updated 05/15/25, 07:14

Description

The test

TYPO3\CMS\Extbase\Tests\Functional\Persistence\Generic\Mapper::dateValuesAreStoredInUtcInTextDatabaseFields

Seems to make not sense. The underlying TCA looks wrong:

        'datetime_text' => [
            'exclude' => true,
            'label' => 'type=datetime, db=text',
            'config' => [
                'type' => 'datetime',
            ],
        ],
        'datetime_int' => [
            'exclude' => true,
            'label' => 'type=datetime, db=int',
            'config' => [
                'type' => 'datetime',
            ],
        ],

There is no db property, only https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Datetime/Index.html#confval-datetime-dbtype, however that one does not accept text.

Initially the ext_tables SQL definitions for these fields where different, however with the auto creation of db fields they have also been removed.

Probably the test can the field can be removed

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Benjamin Franzke commented and changed status New Rejected <span data-processor="relativetime" data-value="2025-04-29T06:55:43+00:00" > 04/29/25, 06:55 </span>

    Hi Lina,

    The SQL definitions for the text-based datetime fields (which are awkward, yes, but still supported) are still set and therefore the test still makes sense, see https://github.com/TYPO3/typo3/blob/cf71760f6160ecbcb9efd393e095580e7f565bba/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.sql#L8

    > There is no db property, only https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Datetime/Index.html#confval-datetime-dbtype, however that one does not accept text.

    The value that is stored in this text-fields is a number (unix timestamp), not a textual representation, yes.
    As I said, awkward, but still supported.

    I hope it’s OK that I reject this issue for this reason.