~/talk

Watch the clock

Talkat Forum PHP 2022 · 2022-10-13..10-14· [security]
slides:none on file

Proposal narrows to one method now() returning DateTimeImmutable so code stops calling time(), uses injected factory or clock object for predictability and testability. A small package implements the clock interface today with at least four interchangeable implementations (including a system clock and a frozen clock), letting tests inject deterministic times; PSR-20 aims to standardize this but the FIG vote is pending, so the package fills the gap and works as described.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:51What is a clock interface
  3. 3:15Problem with impure time functions
  4. 7:36Injecting time to make it pure
  5. 10:49Using factories for predictable time
  6. 13:17Creating a clock interface
  7. 16:27Renaming to clock interface
  8. 17:11Why PSR-20 clock interface matters
  9. 18:34Short history of PHP-FIG
  10. 20:00How I got involved in PSR-20
  11. 21:47Simplifying the interface design
  12. 23:10Time zones and now as slice of time
  13. 27:06Interface vs implementation time zones
  14. 28:11PSR-20 next steps and timeline
  15. 29:12PSR-20 package implementation
  16. 31:18Q&A session begins
  17. 32:22Benefits of using DateTimeImmutable
  18. 34:09Understanding slice of now
  19. 36:39Law of Demeter and clock interface
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.