Review main Merged Breaking

95212[!!!][TASK] Remove global access time variables

Benni Mack CR +2 V +2 Hard +272 −139 updated 09/01/26, 14:07

Commit message

The globals $GLOBALS['ACCESS_TIME'] and $GLOBALS['SIM_ACCESS_TIME'] held
the current respectively simulated execution time floored to the full
minute. They were added in 2008 to keep the SQL of starttime / endtime
comparisons textually stable for up to 60 seconds so the MySQL query
cache could serve repeated requests. That cache is gone from MySQL and
disabled by default in MariaDB, so the motivation no longer applies.

Both values were pure derivatives of EXEC_TIME and SIM_EXEC_TIME that
had to be kept in sync by hand, a contract that got violated often
enough to warrant a dedicated exception in the start and end time
restrictions.

The minute granularity is kept, since record visibility and the frontend
cache lifetime derived from starttime / endtime must share one clock. It
now lives in the date aspect of the Context API, which gains the typed
methods getTimestamp() and getTimestampWithMinutePrecision(). The
existing "accessTime" property delegates to the latter.

All consumers are converted to the Context API. StartTimeRestriction and
EndTimeRestriction keep their optional constructor argument but fall
back to the date aspect, so existing makeInstance() calls keep working.
Their now unreachable RuntimeExceptions are removed.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 29

Show 9 more files

Review log 1016

  1. Benni Mack uploaded patch set 1 08/10/26, 16:57

  2. core-ci voted on patch set 1 V -1 08/10/26, 17:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106298

  3. core-ci commented on patch set 1 08/10/26, 20:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106298

  4. Benni Mack uploaded patch set 2 V -1 08/15/26, 11:44

  5. core-ci voted on patch set 2 V -1 08/15/26, 11:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106757

  6. Benni Mack rebased onto patch set 3 V -1 08/31/26, 22:16

  7. core-ci voted on patch set 3 V -1 08/31/26, 22:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107450

  8. Benni Mack uploaded patch set 4 V -1 09/01/26, 07:28

  9. core-ci voted on patch set 4 V -1 09/01/26, 07:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107468

  10. Benni Mack uploaded patch set 5 V -1 09/01/26, 08:03

  11. core-ci voted on patch set 5 V +1 09/01/26, 08:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107470

  12. Benni Mack marked it ready for review 09/01/26, 09:16

  13. Stefan Bürk voted on patch set 5 CR +1 V +1 09/01/26, 11:55

  14. Oliver Klee voted on patch set 5 V +1 09/01/26, 12:03

  15. Georg Ringer voted on patch set 5 CR +2 V +2 09/01/26, 14:07

  16. Georg Ringer merged patch set 6 09/01/26, 14:07