Review main Ready for review Quiet

97122[TASK] Restore time zones after date tests

Wouter Wolters CR 0 V 0 Normal +47 −36 updated 10/26/26, 21:20

Commit message

Restore the incoming PHP time zone after date-related tests even when
an operation fails. Use teardown for repeated date provider cases and
finally blocks for local timezone changes.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/22/97122/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/22/97122/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 9

Issues 1

Files 3

Review log 78

  1. Wouter Wolters uploaded patch set 1 10/25/26, 09:08

  2. Wouter Wolters updated the commit message in patch set 2 10/26/26, 20:51

  3. Wouter Wolters marked it ready for review 10/26/26, 20:51

  4. Wouter Wolters wrote 10/26/26, 20:51

    Unset private
  5. core-ci voted on patch set 2 V +1 10/26/26, 21:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112612

  6. Oliver Klee commented on patch set 2 10/26/26, 21:08

    AbstractFormElementTest.php:285

    To clearly separate concerns and to ansure the time zone configuration is restores, the backup should go into `setUp()` and the restore into `tearDown()`.
  7. Wouter Wolters commented on patch set 2 10/26/26, 21:18

    AbstractFormElementTest.php:285 Reply

    TYPO3 explicitly forbids #[WithoutErrorHandler] in PHPStan configuration (Build/phpstan/phpstan.neon:16)
  8. Wouter Wolters commented on patch set 2 10/26/26, 21:20

    AbstractFormElementTest.php:285 Reply Unresolved

    Mixed this comment, with your other question in another patch of mine. Had 2 windows open. I explicitly did it this way because we only have one test. Instead of resetting it for each test.