Review main Merged

82423[TASK] Avoid invalid datetime database default in a test

Stefan Bürk CR +2 V +2 Easy +2 −2 updated 01/10/24, 18:24

Commit message

With #102479 support for persisting datetime_immutable
object has been ensured and covered with a functional
test. However, using a empty string as default for a
not nullable datetime field is invalid for MariaDB and
MySQL which seemed to work until now in test executions.

Something has changed, but had no luck to find any traces
in the mariadb, mysql or corresponding docker hub changelogs
and commits explaining this.

The TYPO3 default TCA schema creates nullable fields with a
null default for `date, datetime and timestamp` anyway, and
therefore we now use that for the test case table structure.

It make sense to test a valid structure if working state is
expected.

Note:   It seems that core ci is not blocked by this yet,
        however local execution are broken. To verify with
        and without the change use following command(s):

    > Build/Scripts/runTests.sh -u
    > Build/Scripts/runTests.sh -s functional -d mysql \
        typo3/sysext/core/Tests/Functional/Database/

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Nikita Hovratov +1
    • Markus Hofmann +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Nikita Hovratov +1
    • Markus Hofmann +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1012

  1. Stefan Bürk uploaded patch set 1 01/10/24, 15:36

  2. core-ci voted on patch set 1 V +1 01/10/24, 15:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51389

  3. Garvin Hicking commented on patch set 1 CR +1 V +1 01/10/24, 17:41

    Odd that such a potential BC isn't mentioned properly. A NULL should be better than "" in these datetime cases IMO, so either way this change makes sense even if mariadb/mysql might revert what causes this.
  4. Nikita Hovratov updated the commit message in patch set 2 CR +1 V +1 01/10/24, 18:02

  5. Nikita Hovratov voted on patch set 2 CR +1 V +1 01/10/24, 18:02

  6. Nikita Hovratov commented on patch set 2 01/10/24, 18:02

    Fix some typos, please revote
  7. Markus Hofmann voted on patch set 2 CR +1 V +1 01/10/24, 18:05

  8. core-ci voted on patch set 2 V +1 01/10/24, 18:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51398

  9. Oliver Klee voted on patch set 2 V +1 01/10/24, 18:16

  10. Oliver Klee voted on patch set 2 CR +1 01/10/24, 18:16

  11. Stefan Bürk voted on patch set 2 CR +2 V +2 01/10/24, 18:17

  12. Stefan Bürk merged patch set 3 01/10/24, 18:24