From 2c7474f63b7c378a0046843980eca77fd2d72632 Mon Sep 17 00:00:00 2001 From: "Exploit.cz" Date: Thu, 7 Jul 2022 16:47:39 +0200 Subject: [PATCH] Cast int to float when unserialize json typed as elasticsearch fixes api-platform/api-platform#1344 original fix by @dunglas https://github.com/symfony/symfony/pull/21165/files --- src/Elasticsearch/Serializer/DocumentNormalizer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Elasticsearch/Serializer/DocumentNormalizer.php b/src/Elasticsearch/Serializer/DocumentNormalizer.php index eb60aa71a1b..753e28ea83d 100644 --- a/src/Elasticsearch/Serializer/DocumentNormalizer.php +++ b/src/Elasticsearch/Serializer/DocumentNormalizer.php @@ -34,6 +34,8 @@ final class DocumentNormalizer extends ObjectNormalizer { public const FORMAT = 'elasticsearch'; + + public const JSON_ENCODER_FORMAT = self::FORMAT; private $resourceMetadataFactory;