Skip to content

v3.0.0 - L13 & PHP 8.3

Latest

Choose a tag to compare

@skywarth skywarth released this 06 Jun 20:26
e6b47c4

What's Changed

  • Upgrade to Laravel 13 API and PHP 8.3 syntax by @skywarth in #8
  • CI pipeline update by @skywarth in #9
  • Fix implicit float to int conversion in randomTimeSchedule by @rik-legger in #7

Migrating from v2.x to v3.x

The documented public usage stays compatible: macro names, parameter orders, and behaviors are unchanged, and seed determinism is preserved (a given (uniqueIdentifier, basisDate, periodType) tuple yields the same generated runs in v2 and v3, so your existing schedules don't drift).

Two scoped changes worth noting:

  1. Floor versions: v3.0.0 requires PHP >=8.3 and Laravel >=v13.x. Projects on older versions should stay on the v2.x line.
  2. randomDays period parameter is now a native enum. The documented call style (RandomDateScheduleBasis::WEEK, ::MONTH, ::YEAR) continues to work unchanged because those constants are now enum cases. If you were passing raw integers (e.g. randomDays(10, ...)) or calling helper static methods (RandomDateScheduleBasis::getString(), getDayCount(), validate(), isValid(), getAll()), switch to the enum cases or cases() / tryFrom() / ->periodString(). The InvalidScheduleBasisProvided exception is removed — invalid values now surface as a TypeError from the type system itself. Note that TypeError extends \Error, not \Exception, so any broad catch (\Exception $e) blocks you had wrapping these calls will need to be widened to catch (\Throwable $e) (or replaced with a typed catch (\TypeError $e)) if you want to recover from invalid input at runtime.

New Contributors

Full Changelog: v2.0.0...v3.0.0