Wants to convert doctrine entiry object to normal array, this is my code so far,
$demo = $this->doctrine->em->find(\'Entity\\User\',2);
I'm new to Symfony, but there is some working (but strange) way:
json_decode($this->container->get('serializer')->serialize($entity, 'json'))