From c6454e5bc9d229a6d93c4c700b4f4787e2540507 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Wed, 24 Apr 2024 13:48:28 +0000 Subject: [PATCH] Updated Carbon dependency Signed-off-by: Tom Wright --- CHANGELOG.md | 3 +++ composer.json | 2 +- src/Constraint/DateTime/Max.php | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6488a1..d506204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v0.4.3 (2024-04-24) +* Updated Carbon dependency + ## v0.4.2 (2023-11-14) * Updated Dictum dependency * Made PHP8.1 minimum version diff --git a/composer.json b/composer.json index 473d80e..8b4350e 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "decodelabs/lucid-support": "^0.3", "decodelabs/veneer": "^0.10.10", - "nesbot/carbon": "^2.25" + "nesbot/carbon": "^2|^3" }, "require-dev": { "decodelabs/phpstan-decodelabs": "^0.6", diff --git a/src/Constraint/DateTime/Max.php b/src/Constraint/DateTime/Max.php index 727bb75..de838ad 100644 --- a/src/Constraint/DateTime/Max.php +++ b/src/Constraint/DateTime/Max.php @@ -53,7 +53,10 @@ public function getParameter(): mixed public function validate( mixed $value ): Generator { - if ($value === null) { + if ( + $value === null || + $this->max === null + ) { return true; }