Skip to content

Instantly share code, notes, and snippets.

@benlac
benlac / EntityNormalizer.php
Created April 13, 2020 21:34 — forked from Epskampie/EntityNormalizer.php
Automatically deserialize doctrine entities when using Symfony Serializer
<?php declare (strict_types = 1);
namespace App\Normalizer;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
/**
* Entity normalizer
*/
class EntityNormalizer implements DenormalizerInterface