title: symfony 4 - flysystem autowire
body: <p>could you help me with this please?</p>
  
  <p>Cannot autowire service "App\Estimate\DocumentManager": argument "$flysystem" of method "__construct()" references class "League\Flysystem\Filesystem" but no such service exists. You should maybe alias this class to the existing "oneup_flysystem.estimateDocumentsFilesystem_filesystem" service.</p>
  
  <p>my config file:</p>
  
  <pre><code>parameters:
      flysystem.local.estimate_documents.path: '%kernel.root_dir%/../public/uploads/estimate/documents'
  
  services:
      app.estimate.document_manager:
          class: App\Estimate\DocumentManager
          lazy: true
          public: true
          arguments: ['@doctrine.orm.entity_manager', '@estimateDocumentsFilesystem', '@monolog.logger']
  
  oneup_flysystem:
      filesystems:
          estimateDocumentsFilesystem:
              adapter: estimateDocumentsAdapter
              visibility: public
              alias: "estimate_documents_filesystem"
  
      adapters:
          estimateDocumentsAdapter:
              local:
                  directory: "%flysystem.local.estimate_documents.path%"
  
  class DocumentManager
  {
  
      /**
       * @var EntityManager
       */
      private $manager;
  
      /**
       * @var Filesystem
       */
      private $flysystem;
  
      /**
       * @var Logger
       */
      private $logger;
  
      /**
       * DocumentManager constructor.
       *
       * @param EntityManagerInterface $manager
       * @param Filesystem $flysystem
       * @param Logger $logger
       */
      public function __construct(
          EntityManagerInterface $manager,
          Filesystem $flysystem,
          Logger $logger
      )
      {
          $this-&gt;manager = $manager;
          $this-&gt;flysystem = $flysystem;
          $this-&gt;logger = $logger;
      }
  }
  </code></pre>
  
  <p>Thanks a lot. I can't understand where is problem.</p>
  
  <p>// EDIT:</p>
  
  <p>if I add thisIf i add this in config</p>
  
  <pre><code>services:
  League\Flysystem\FilesystemInterface: '@estimate_documents_filesystem'
  </code></pre>
  
  <p>it works only for one filesystem what the f.. is wrong?</p>
  
  <p>The best regards
  Jimmy</p>