Skip to content

Commit d2376aa

Browse files
committed
Make MapDateTime extend ValueResolver
1 parent 59b362d commit d2376aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Symfony/Component/HttpKernel/Attribute/MapDateTime.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@
1111

1212
namespace Symfony\Component\HttpKernel\Attribute;
1313

14+
use Symfony\Component\HttpKernel\Controller\ArgumentResolver\DateTimeValueResolver;
15+
1416
/**
1517
* Controller parameter tag to configure DateTime arguments.
1618
*/
1719
#[\Attribute(\Attribute::TARGET_PARAMETER)]
18-
class MapDateTime
20+
class MapDateTime extends ValueResolver
1921
{
2022
public function __construct(
21-
public readonly ?string $format = null
23+
public readonly ?string $format = null,
24+
bool $disabled = false,
2225
) {
26+
parent::__construct(DateTimeValueResolver::class, $disabled);
2327
}
2428
}

0 commit comments

Comments
 (0)