title: Typing entity on Symfony 4 Event drops and error
body: <p>My Event:</p>
  
  <pre><code>namespace App\Event;
  
  use Symfony\Component\EventDispatcher\Event;
  use App\Entity\Album;
  
  class AlbumEvent extends Event
  {
  
  protected $album;
  
  public function __construct(Album $album)
  {
      $this-&gt;album = $album;
  }
  </code></pre>
  
  <p>The error:</p>
  
  <blockquote>
    <p>Cannot autowire service "App\Event\AlbumEvent": argument "$album" of
    method "__construct()" references class "App\Entity\Album" but no such
    service exists.</p>
  </blockquote>
  
  <p>And the entity actually exists :</p>
  
  <pre><code>namespace App\Entity;
  class Album
  {
  </code></pre>
  
  <p>My config (Everything set to true, cause I don't know if it can interfere):</p>
  
  <pre><code>services:
     _defaults:
          autowire: true
          autoconfigure: true
          public: true     
  </code></pre>
  
  <p>And the listener dispatching the event:</p>
  
  <pre><code>namespace App\EventListener;
  
  use Doctrine\ORM\Event\LifecycleEventArgs;
  use App\Entity\Album;
  use App\Event\AlbumEvent;
  use App\Event\AlbumEvents;
  
  class OrmListener {
  
  public function __construct($ed) {
      $this-&gt;ed = $ed;
  }
  
  
  public function preRemove(LifecycleEventArgs $args) {
      $e = $args-&gt;getEntity();
  
      if ($e instanceof Album) {
          $ev2 = new AlbumEvent($e);
          $this-&gt;ed-&gt;dispatch(AlbumEvents::PREREMOVE, $ev2);
          return;
      }
   }
  }
  </code></pre>
  
  <p>And both listeners config:</p>
  
  <pre><code>    album_listener:
      class: App\EventListener\AlbumListener
      arguments: [ '@doctrine.orm.entity_manager']
  
      tags:
         - { name: kernel.event_listener, event: album.preremove, method: preremove}
  
  
      orm.listener:
      class: App\EventListener\OrmListener
      arguments: ['@event_dispatcher']
      tags:
          - { name: doctrine.event_listener, event: preUpdate, method: preUpdate }
          - { name: doctrine.event_listener, event: postUpdate, method: postUpdate }
          - { name: doctrine.event_listener, event: prePersist, method: prePersist }
          - { name: doctrine.event_listener, event: postPersist, method: postPersist }
          - { name: doctrine.event_listener, event: postRemove, method: postRemove }
          - { name: doctrine.event_listener, event: preRemove, method: preRemove }
  </code></pre>