could you help me with this please?
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.
my config file:
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->manager = $manager;
$this->flysystem = $flysystem;
$this->logger = $logger;
}
}
Thanks a lot. I can't understand where is problem.
// EDIT:
if I add thisIf i add this in config
services:
League\Flysystem\FilesystemInterface: '@estimate_documents_filesystem'
it works only for one filesystem what the f.. is wrong?
The best regards Jimmy