CacheableSupportsMethodToGetSupportedTypesRector

Replace removed CacheableSupportsMethodInterface with getSupportedTypes() method in normalizers

-use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface;
 use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

-final class TopicNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface
+final class TopicNormalizer implements NormalizerInterface
 {
-    public function hasCacheableSupportsMethod(): bool
+    public function getSupportedTypes(?string $format): array
     {
-        return true;
+        return ['*' => true];
     }
 }

Configure your rector.php:

<?php

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

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

Other rules in the symfony/serializer set