title: Cannot autowire service "App\Service\MatchCarAdService": argument "$templating" of method
body: <p>Hi I'm creating a service. This is the code,</p>
  
  <pre><code>namespace App\Service;
  
  use Symfony\Component\DependencyInjection\ContainerInterface;
  use App\Entity\CarAd;
  
  class MatchCarAdService {
  
      protected $mailer;
      protected $templating;
  
  
      public function __construct(ContainerInterface $container, \Swift_Mailer $mailer, $templating) {
          $this-&gt;container = $container;
          $this-&gt;mailer = $mailer;
          $this-&gt;templating = $templating;
      }
  
      public function sendMail() {
          $message = (new \Swift_Message('Hello Email'))
                  -&gt;setFrom('vimuths@yahoo.com')
                  -&gt;setTo('vimuths@yahoo.com')
                  -&gt;setBody(
                  $this-&gt;templating-&gt;render(
                          // templates/emails/matching-cars.html.html.twig
                          'emails/matching-cars.html.html.twig', []
                  ), 'text/html'
          );
  
      $this-&gt;mailer-&gt;send($message);
  </code></pre>
  
  <p>This is services.yml</p>
  
  <pre><code>MatchCarAdService:
              class: App\Service\MatchCarAdService
              arguments: ['@mailer','@templating']
  </code></pre>
  
  <p>But I'm getting this error,</p>
  
  <blockquote>
    <p>Cannot resolve argument $matchService of
    "App\Controller\Api\SearchController()": Cannot autowire service
    "App\Service\MatchCarAdService": argument "$templating" of method
    "__construct()" has no type-hint, you should configure its value
    explicitly.</p>
  </blockquote>