AddGetSupportedTypesToNormalizerRector

Add getSupportedTypes() method to normalizers and denormalizers missing it, as it is required since Symfony 7.0

 use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

 final class TopicNormalizer implements NormalizerInterface
 {
+    public function getSupportedTypes(?string $format): array
+    {
+        return ['*' => false];
+    }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony70\Rector\Class_\AddGetSupportedTypesToNormalizerRector;

return RectorConfig::configure()
    ->withRules([
        AddGetSupportedTypesToNormalizerRector::class,
    ]);
PACKAGE:  symfony/serializer >=7.0

Other rules in the symfony/serializer set