diff --git a/Archiver/FileIteratorReaderArchiver.php b/Archiver/FileIteratorReaderArchiver.php index 3cecfbd..e40fcbd 100644 --- a/Archiver/FileIteratorReaderArchiver.php +++ b/Archiver/FileIteratorReaderArchiver.php @@ -4,7 +4,7 @@ use Akeneo\Bundle\BatchBundle\Entity\JobExecution; use Akeneo\Bundle\BatchBundle\Step\ItemStep; -use Gaufrette\Filesystem; +use League\Flysystem\Filesystem; use Pim\Bundle\BaseConnectorBundle\Archiver\AbstractFilesystemArchiver; use Pim\Bundle\ExcelConnectorBundle\Reader\FileIteratorReader; @@ -49,11 +49,11 @@ public function archive(JobExecution $jobExecution) if ($reader instanceof FileIteratorReader) { $key = strtr( $this->getRelativeArchivePath($jobExecution), - array( + [ '%filename%' => basename($reader->getFilePath()), - ) + ] ); - $this->filesystem->write($key, file_get_contents($reader->getFilePath()), true); + $this->filesystem->put($key, file_get_contents($reader->getFilePath())); } } } diff --git a/Resources/config/archiving.yml b/Resources/config/archiving.yml index ca54dfd..8462440 100644 --- a/Resources/config/archiving.yml +++ b/Resources/config/archiving.yml @@ -5,6 +5,6 @@ services: pim_excel_connector.archiver.file_iterator_reader_archiver: class: %pim_excel_connector.archiver.file_iterator_reader_archiver.class% arguments: - - '@pim_archivist_filesystem' + - '@oneup_flysystem.archivist_filesystem' tags: - - { name: pim_base_connector.archiver } \ No newline at end of file + - { name: pim_base_connector.archiver }