Call to an undefined method Symfony\Component\Serializer\Normalizer\NormalizerInterface::denormalize().

In API Platform or in Symfony, If you use a denormalization like this :

use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

private NormalizerInterface $normalizer;

$this->normalizer = $normalizer;


$this->normalizer->denormalize($data, Object::class)

You need to change it to a denormalizerInterface like this

use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;

private DenormalizerInterface $denormalizer;

$this->denormalizer = $denormalizer;

$this->denormalizer->denormalize($data(), Object::class);