Можно создать App\Normalizer\EntityNormalizer.php с таким содержимым:
Для symfony 4 можно глянуть тут: https://medium.com/cloudstek/using-the-s...