From f1ebb0a7ab56a0acf1010badcd7b1cb6e3d206e9 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Thu, 31 Oct 2024 12:13:17 +0100 Subject: [PATCH] treat an int as a float --- fixtures/CreatedAtType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/CreatedAtType.php b/fixtures/CreatedAtType.php index 4aef818..9b903f4 100644 --- a/fixtures/CreatedAtType.php +++ b/fixtures/CreatedAtType.php @@ -56,7 +56,7 @@ public function normalize(mixed $value): null|string|int|float|bool public function denormalize(null|string|int|float|bool $value): mixed { - if (!\is_float($value)) { + if (!\is_float($value) && !\is_int($value)) { throw new \LogicException("'$value' is not a float"); }