I am using symfony 4 and I want to access a repository for an entity if I am in the Command class. There is not a function getDoctrine or something..
getDoctrine
I
I use this syntax :
$em = $this->getContainer()->get('doctrine')->getEntityManager();