Skip to content

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 21 Aug 19:23
· 3 commits to master since this release
e9becdd
  • Check the README examples on every build with rasuvaeff/doc-exec: the usage
    block in README.md and README.ru.md is executed against the real
    Duration API, and composer build fails if an example stops matching it.
  • Migrate the property-based test suite from the frozen rasuvaeff/property-testing 2.x to the new rasuvaeff/property-testing-testo adapter (drop-in, no PHP code changes; same #[Property] attribute and Gen API).
  • Persist the property regression corpus across coverage CI runs (restore before tests, env PROPERTY_DB, save on completion of any non-cancelled run, including failed ones).
  • Adopt rasuvaeff/rector-named-literals and apply the named-argument rule to literal calls.
  • Raise rasuvaeff/property-testing-testo to ^0.6.
  • Fix __toString(): a value that rounds up into the next unit (e.g. 999.5ms, which toMillis() rounds up to 1000) now falls through to that next unit ("0.9995s") instead of printing a misleading whole-number value in the wrong unit ("1000ms"). The same class of boundary artifact is now also closed at the s/min and min/h boundaries.
  • Fix __toString(): day counts of 1,000,000 or more no longer render in scientific notation ("1.0e+6d"); they render as a plain integer ("1000000d").
  • Fix plus(): overflowing PHP_INT_MAX microseconds now throws InvalidArgumentException('Duration overflow: ...') instead of silently promoting to float and letting the constructor throw an unrelated TypeError.
  • Fix seconds()/minutes()/hours()/days(): overflowing PHP_INT_MAX microseconds now throws InvalidArgumentException('Duration overflow: ...') instead of silently producing a wrong (possibly zero) duration via an out-of-range float-to-int cast.