From 8e4312a02640ad075036d3c024c7e12494a5ae56 Mon Sep 17 00:00:00 2001 From: Damien Carcel Date: Mon, 5 Oct 2015 17:13:47 +0200 Subject: [PATCH] Replace "Gaufrette Filesystem" by "League" one Replace "pim_archivist_filesystem" by "oneup_flysystem.archivist_filesystem" service --- Archiver/FileIteratorReaderArchiver.php | 8 ++++---- Resources/config/archiving.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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 }