Page MenuHomeDevCentral

Refactor DateStamp with constructor property promotion
AcceptedPublic

Authored by dereckson on Apr 18 2026, 11:56.
Tags
None
Referenced Files
F52639386: D4076.id.diff
Sat, Oct 3, 18:21
Unknown Object (File)
Thu, Oct 1, 13:02
Unknown Object (File)
Thu, Oct 1, 06:43
Unknown Object (File)
Wed, Sep 30, 23:53
Unknown Object (File)
Tue, Sep 29, 08:59
Unknown Object (File)
Mon, Sep 28, 19:07
Unknown Object (File)
Mon, Sep 28, 17:12
Unknown Object (File)
Mon, Sep 28, 15:21
Subscribers

Details

Reviewers
dereckson

Diff Detail

Repository
rKERUALD Keruald libraries development repository
Lint
Lint Passed
Unit
Tests Passed
Branch
follow-up-for-doc-ii
Build Status
Buildable 6708
Build 6996: arc lint + arc unit

Event Timeline

dereckson created this revision.

The refactor looks good, but Harbormaster reports unit test fails in:

  • omnitools/tests/DateTime/DateStampTest.php
  • omnitools/tests/Reflection/CodeClassTest.php

And fromUnixTime() changed from accepting a nullable/default argument to requiring an int, with now() replacing the no-argument usage.
Could you confirm all no-argument fromUnixTime() calls have been migrated, and fix or explain the failing unit tests?

For reference, to launch unit tests from Arcanist was broken as Xdebug was invoked without code coverage support.

https://github.com/nasqueron/arcanist/commit/2287f8768605272aba2544fa9f4192623f7d05ae fixed the issue.

This revision is now accepted and ready to land.Jun 7 2026, 09:41

As it changes the behavior of fromUnixTime, let's put this in 1.x series.