title: Circular reference detected for service "doctrine.dbal.default_connection", path: "doctrine.dbal.default_connection"
body: <p>An error occurred when I tried to put the service <code>@doctrine.orm.entity_manager</code> as an argument for my listener <code>UserDeletionListener</code>.</p>
  
  <p>My service:</p>
  
  <pre><code>se.doctrine_listener.user_deletion:
          class: SE\CoreBundle\DoctrineListener\UserDeletionListener
          arguments:
                - "@doctrine.orm.entity_manager"
          tags:
              - { name: doctrine.event_listener, event: preRemove }
  </code></pre>
  
  <p>My listener:</p>
  
  <pre><code>namespace SE\CoreBundle\DoctrineListener;
  
  use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
  use Doctrine\ORM\EntityManager;
  use SE\UserBundle\Entity\User;
  
  class UserDeletionListener
  {
      /**
       * @var \Doctrine\ORM\EntityManager
       */
      private $em;
  
      public function __construct(EntityManager $entityManager)
      {
          $this-&gt;em = $entityManager;
      }
  /...
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>Circular reference detected for service "doctrine.dbal.default_connection", path: "doctrine.dbal.default_connection".
  </code></pre>