Add getSupportedTypes method for (de)normalizerInterface implementations

This commit is contained in:
2025-05-26 11:21:59 +02:00
parent 17db59d221
commit 6e21f2688f
34 changed files with 277 additions and 2 deletions

View File

@@ -86,6 +86,8 @@ class StoredObjectDenormalizer implements DenormalizerInterface
public function getSupportedTypes(?string $format): array
{
// TODO: Implement getSupportedTypes() method.
return [
StoredObject::class => true,
];
}
}

View File

@@ -117,6 +117,13 @@ class RequestPdfSignMessageSerializerTest extends TestCase
{
return $data instanceof PDFSignatureZone;
}
public function getSupportedTypes(?string $format): array
{
return [
PDFSignatureZone::class => true,
];
}
};
$denormalizer = new class () implements DenormalizerInterface {
public function denormalize($data, string $type, ?string $format = null, array $context = []): mixed
@@ -128,6 +135,13 @@ class RequestPdfSignMessageSerializerTest extends TestCase
{
return PDFSignatureZone::class === $type;
}
public function getSupportedTypes(?string $format): array
{
return [
PDFSignatureZone::class => true,
];
}
};
$serializer = new Serializer([$normalizer, $denormalizer]);