From 00d56d24f5d5478df1a874249f5f487d221f99a5 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Wed, 29 Jan 2025 12:23:24 +0100 Subject: [PATCH] fix: allow int value as DateTime param --- 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; }