From 9a90f8ef013f471b81509b84fb969165b5a0b9e4 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Wed, 29 Jan 2025 12:25:18 +0100 Subject: [PATCH] fix: allow int value as DateTime param (#289) --- src/Param/ParamValueConverterRegistry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Param/ParamValueConverterRegistry.php b/src/Param/ParamValueConverterRegistry.php index b2d2e3c..331d967 100644 --- a/src/Param/ParamValueConverterRegistry.php +++ b/src/Param/ParamValueConverterRegistry.php @@ -266,7 +266,7 @@ private static function decimalConverter(): Closure private static function dateConverter(): Closure { - return static fn (DateTimeInterface|string|float $value) => $value instanceof DateTimeInterface + return static fn (DateTimeInterface|string|int|float $value) => $value instanceof DateTimeInterface ? $value->format('Y-m-d') : $value; }