title: symfony 4.1: no such service exists
body: <p>So I've created a new Symfony 4.1 project last week and have been working on it without any issues. Until yesterday when I started using some third party dependencies. I installed the Guzzle Client by using the <code>composer require guzzlehttp/guzzle</code>. This installed the package just fine as far as I can see. </p>
  
  <p>However, when I then try to inject this service into a constructor in my code (an event or command), I get the error message: <code>Cannot autowire service "App\xxx\Command\testCommand": argument "$client" of method "__construct()" references class "GuzzleHttp\Client" but no such service exists.</code></p>
  
  <p>The Guzzle service is not the only one that doesn't work, this is just an example. The weird thing to me is that there are a lot of dependencies that I have that work just fine like the Doctrine DocumentManager, JMS serializer and NelmioApiDocBundle. </p>
  
  <p>What I've tried so far (and actually semi-solves the problem) is adding the service name to my services.yaml file:</p>
  
  <pre><code>services:
      # default configuration for services in *this* file
      _defaults:
          autowire: true      # Automatically injects dependencies in your services.
          autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
          public: false       # Allows optimizing the container by removing unused services; this also means
                          # fetching services directly from the container via $container-&gt;get() won't work.
                          # The best practice is to be explicit about your dependencies anyway.   
  
      GuzzleHttp\Client:  &lt;-- Adding this makes it work flawlessly.
  </code></pre>
  
  <p>The problem I have with this solution is that I would end up adding hundreds of services to my services.yaml file just to get them to work. It seems to me like this is not the optimal solution. </p>
  
  <p>So my question is how I could resolve this in the most elegant way. Is this something I'm doing wrong in my project? Is it something that has to be resolved on the vendors side? And if so, how could it be made to work with Symfony 4.1? </p>