title: How to inject Doctrine Entity Manager into Symfony 4 Service
body: <p>I have a controller</p>
  
  <pre><code>use Doctrine\ORM\EntityManagerInterface:
  class ExampleController{
     public function someFunction(ExampleService $injectedService){
         $injectedService-&gt;serviceFunction();
      }
  }
  </code></pre>
  
  <p>With a Service</p>
  
  <pre><code>use Doctrine\ORM\EntityManagerInterface;
  class ExampleService{
      public function __construct(EntityManagerInterface $em){
          ...
      }    
  }
  </code></pre>
  
  <p>However, calls to <code>someFunction()</code> fail due to 0 parameters being passed (the EntityManagerInterface is not being injected).  I am attempting to use the EntityManager from the Service.  Autowiring is on.  I've tried the solutions for Symfony3 but they don't seem to work unless I'm missing something.</p>
  
  <p>Edit: Here is my services.yaml:</p>
  
  <pre><code>services:
      _defaults:
          autowire: true
          autoconfigure: true
          public: false 
  
      App\:
          resource: '../src/*'
          exclude: '../src/{Entity,Migrations,Tests,Kernel.php}'
  
      App\Controller\:
          resource: '../src/Controller'
          tags: ['controller.service_arguments']
  </code></pre>