Closed jason-nabooki closed 3 years ago
@jason-nabooki great catch! Unfortunately, this is BC change. On order to ship it now, I created a new method: https://github.com/spatie/calendar-links/commit/863f16557f2b84bcfb9c72eaed901a41114f3acd Thanks for the catch and the idea!
Context and Purposes
When throwing an invalid date range exception the arguments are the wrong way around which results in a misleading exception message.
exception Spatie\CalendarLinks\Exceptions\InvalidLink: TO time (
2021-03-12 11:30:00
) must be greater than FROM time (2021-03-12 09:30:00
)The signature for InvalidLink exception is
public static function invalidDateRange(DateTimeInterface $to, DateTimeInterface $from): self