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:
- Floor versions: v3.0.0 requires PHP
>=8.3and Laravel>=v13.x. Projects on older versions should stay on the v2.x line. randomDaysperiod 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 orcases()/tryFrom()/->periodString(). TheInvalidScheduleBasisProvidedexception is removed — invalid values now surface as aTypeErrorfrom the type system itself. Note thatTypeErrorextends\Error, not\Exception, so any broadcatch (\Exception $e)blocks you had wrapping these calls will need to be widened tocatch (\Throwable $e)(or replaced with a typedcatch (\TypeError $e)) if you want to recover from invalid input at runtime.
New Contributors
- @rik-legger made their first contribution in #7
Full Changelog: v2.0.0...v3.0.0