How do I use Doctrine in a service container?
The Code just causes an error message \"Fatal error: Call to undefined method ...::get()\".
I am using Symfony 3.4. If you want to create a service in a bundle this works for me:
services: Vendor\YourBundle\Service\YourService: arguments: $em: '@doctrine.orm.entity_manager'
In your Service.php
em = $em; } }