From 7e7feea8713ea5deabf4bba8f1baebcb85406d65 Mon Sep 17 00:00:00 2001 From: Steen Rabol Date: Wed, 9 Jul 2025 10:23:31 +0200 Subject: [PATCH] Address Caster should return Address object not DateTimeInterface --- src/Web/Documentation/content/1.x/2-features/01-mapper.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/Documentation/content/1.x/2-features/01-mapper.md b/src/Web/Documentation/content/1.x/2-features/01-mapper.md index 8a0c4a36..035a5709 100644 --- a/src/Web/Documentation/content/1.x/2-features/01-mapper.md +++ b/src/Web/Documentation/content/1.x/2-features/01-mapper.md @@ -173,7 +173,7 @@ use Tempest\Mapper\Caster; final readonly class AddressCaster implements Caster { - public function cast(mixed $input): DateTimeInterface + public function cast(mixed $input): Address { return new Address( street: $input['street'], @@ -235,4 +235,4 @@ $container->get(SerializerFactory::class) ->addSerializer(Address::class, AddressSerializer::class); ``` -If you're looking for the right place where to put this logic, [provider classes](/docs/extra-topics/package-development#provider-classes) is our recommendation. \ No newline at end of file +If you're looking for the right place where to put this logic, [provider classes](/docs/extra-topics/package-development#provider-classes) is our recommendation.