How can I get an entity manager from inside a controller with latest Symfony and Doctrine?
The way described in "The Book" flagged as deprecated now. What is a modern (proper) way to do this?
public function someAction()
{
// getEntityManager() from Doctrine\Bundle\DoctrineBundle\Registry is deprecated
$entityManager = $this->getDoctrine()->getEntityManager();
...
}