From 3f668087d2f9985c3da67881d02356d353019a0d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 9 Apr 2021 12:21:42 +0200 Subject: add minimal fix for PHP 8 from https://github.com/tplaner/When/pull/80 --- php-when-php8.patch | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 php-when-php8.patch (limited to 'php-when-php8.patch') diff --git a/php-when-php8.patch b/php-when-php8.patch new file mode 100644 index 0000000..220cf03 --- /dev/null +++ b/php-when-php8.patch @@ -0,0 +1,31 @@ +From 9f7b61aa41b3a7686f924a0e1c2286a26f369124 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 9 Apr 2021 12:18:16 +0200 +Subject: [PATCH] fix implode calls + +--- + src/When.php | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/When.php b/src/When.php +index 47279eb..9b1ddeb 100644 +--- a/src/When.php ++++ b/src/When.php +@@ -62,7 +62,7 @@ public function freq($frequency) + return $this; + } + +- throw new InvalidArgumentException("freq: Accepts " . rtrim(implode(Valid::$frequencies, ", "), ",")); ++ throw new InvalidArgumentException("freq: Accepts " . rtrim(implode(", ", Valid::$frequencies), ",")); + } + + public function until($endDate) +@@ -244,7 +244,7 @@ public function wkst($weekDay) + return $this; + } + +- throw new InvalidArgumentException("wkst: Accepts " . rtrim(implode(Valid::$weekDays, ", "), ",")); ++ throw new InvalidArgumentException("wkst: Accepts " . rtrim(implode(", ", Valid::$weekDays), ",")); + } + + public function rrule($rrule) -- cgit