title: Symfony 4.4 how to configure controllers without autowiring
body: <p>I need to inject service to controller constructor method</p>
  
  <p>service.yaml</p>
  
  <pre><code>imports:
      - { resource: controllers.yaml }
  
  services:
      _defaults:
          autowire: false
          autoconfigure: false 
          public: false
  
      App\:
          resource: '../src/*'
          exclude: '../src/{Application/Message,Infrastructure/Repository/MySql/Migrations,Tests,Kernel.php}'
  </code></pre>
  
  <p>controllers.yaml</p>
  
  <pre><code>    app.controller:
          class: App\UI\Controller\AppController
          arguments:
              - '@monolog.logger.api'
          tags: ['controller.service_arguments']
  
      app.controller.keyword:
          class: App\UI\Controller\BlogController
          arguments:
              - '@monolog.logger.api'
          tags: ['controller.service_arguments']
  </code></pre>
  
  <p>BlogController.php</p>
  
  <pre><code>class BlogController extends AbstractController
  {
      private $logger;
  
      public function __construct(LoggerInterface $logger)
      {
          $this-&gt;logger = $logger;
      }
  
      public function postForSubscribers(Request $request, FindPostQuery $query): JsonResponse
      {
          $page = $request-&gt;query-&gt;get('page') ?? 1;
          $limit = $request-&gt;query-&gt;get('limit') ?? 500;
          $daysBack = $request-&gt;query-&gt;get('days-back') ?? '7';
          try {
              $results = $query-&gt;getResults($daysBack, new Paging((int)$page, (int)$limit));
              return new JsonResponse($results-&gt;normalize());
          } catch (Exception $e) {
              $this-&gt;logger-&gt;warning($e-&gt;getMessage(), [
                  'line' =&gt; $e-&gt;getLine(),
                  'file' =&gt; $e-&gt;getFile(),
                  'trace' =&gt; $e-&gt;getTraceAsString(),
              ]);
              return new JsonResponse(['error' =&gt; 'Something broken, cant fetch post data.'], 500);
          }
      }
  }
  </code></pre>
  
  <p>Action <code>postForSubscribers</code> return <code>The controller for URI "/api/v1/post/subscribers" is not callable. Controller "App\UI\Controller\BlogController" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?</code></p>
  
  <p>But controllers.yaml contains controller tags, how I should configure my controllers instead? 
  Anyone can help?</p>
  
  <p>PS. When I add to service.yaml:</p>
  
  <pre><code>App\UI\Controller\:
          resource: '../src/UI/Controller'
          tags: ['controller.service_arguments']
  </code></pre>
  
  <p>I get: <code>Too few arguments to function App\UI\Controller\BlogController::__construct(), 0 passed in /var/www/html/var/cache/dev/ContainerV9lwkz0/getBlogControllerService.php on line 13 and exactly 1 expected</code></p>