From 9135850adedf2e96c3fca12456a08dfbcd1e0bae Mon Sep 17 00:00:00 2001 From: Yoann MOROCUTTI Date: Fri, 22 Aug 2025 09:36:33 +0200 Subject: [PATCH] fix: Fix an issue where serializing objects was not working correctly with Symfony 6.4 [symfony6-4] --- DataCollector/ProfilerDataCollector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DataCollector/ProfilerDataCollector.php b/DataCollector/ProfilerDataCollector.php index 6afc2fc..69fc0f9 100644 --- a/DataCollector/ProfilerDataCollector.php +++ b/DataCollector/ProfilerDataCollector.php @@ -11,6 +11,7 @@ use Symfony\Component\HttpKernel\Event\ExceptionEvent; use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\Event\ResponseEvent; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Component\Serializer\Serializer; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Stopwatch\Stopwatch; @@ -278,7 +279,7 @@ public function fetchTransferInfos(array $call): array public function fetchRequestInfos(Request $request): array { - $normalizers = array(new RequestNormalizer()); + $normalizers = array(new RequestNormalizer(), new ObjectNormalizer()); $encoders = array(new JsonEncoder()); $serializer = new Serializer($normalizers, $encoders);