title: can't pass argument to event listener
body: <p>Using Symfony 2.5.3. I'm trying to send a 'welcome' e-mail when someone has succesfully registered(FOS Userbunde), using an EventListener. The event fired is <code>fos_user.registration.success</code>. </p>
  
  <p>So I added a service:</p>
  
  <pre><code>mycustom_user.registration_success:
      class: Mycustom\UserBundle\EventListener\RegistrationListener
      arguments: [@mycustom_user.mailer]
      tags:
          - { name: kernel.event_listener, event: fos_user_registration_success, method: onRegistrationSuccess}
  </code></pre>
  
  <p>The listener itself:</p>
  
  <pre><code>namespace Mycustom\UserBundle\EventListener;
  
  use FOS\UserBundle\FOSUserEvents;
  use FOS\UserBundle\Event\UserEvent;
  use FOS\UserBundle\Event\FormEvent;
  use Mycustom\UserBundle\Mailer\Mailer;
  use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  
  class RegistrationListener implements EventSubscriberInterface
  {
      protected $mailer;
  
      public function __construct(Mailer $mailer)
      {
          $this-&gt;mailer = $mailer;
      }
  
  
      public static function getSubscribedEvents()
      {
          return array(
              FOSUserEvents::REGISTRATION_SUCCESS =&gt; 'onRegistrationSuccess',
          );
      }
  
      public function onRegistrationSuccess(FormEvent $event)
      {
          $user = $event-&gt;getForm()-&gt;getData();
  
          $this-&gt;mailer-&gt;sendWelcomeMessage($user);
  
          $url = $this-&gt;router-&gt;generate('fos_user_security_login');
          $event-&gt;setResponse(new RedirectResponse($url));
      }
  }
  </code></pre>
  
  <p>The mailer itself contains the rendering of the content of the email, also registered as a service:</p>
  
  <pre><code>mycustom_user.mailer:
      class: Mycustom\UserBundle\Mailer\Mailer
      arguments: ['@templating']
  </code></pre>
  
  <p><code>mycustom_user.mailer</code> is argument for the listener. But somehow I keep getting this error:</p>
  
  <pre><code>Catchable Fatal Error: Argument 1 passed to 
  Mycustom\UserBundle\EventListener\RegistrationListener::__construct() 
  must be an instance of Mycustom\UserBundle\Mailer\Mailer, none given, 
  called in mycustom/app/cache/dev/appDevDebugProjectContainer.php 
  on line 2214 and defined in mycustom/src/Mycustom/UserBundle/EventListener/RegistrationListener.php line 19
  </code></pre>
  
  <p>I tried other arguments like @doctrine (and changed the listeners constructor accordingly), but I keep getting the same error. Also the @templating argument to the mailer service doesn't work.</p>
  
  <p>What am I doing wrong here?</p>