From af76c93a7a7d0e6f8e9e9ca13005f54fbc6f2af7 Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Fri, 26 Feb 2021 19:06:13 +0000 Subject: [PATCH 1/2] [9.x] Fixing the Error : Class "League\Flysystem\Adapter\Local" not found This is related to the new Flysystem v2 (Check the PR #33612) --- src/Illuminate/Foundation/Console/VendorPublishCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Foundation/Console/VendorPublishCommand.php b/src/Illuminate/Foundation/Console/VendorPublishCommand.php index 842c3759da8a..4b248666fe25 100644 --- a/src/Illuminate/Foundation/Console/VendorPublishCommand.php +++ b/src/Illuminate/Foundation/Console/VendorPublishCommand.php @@ -6,7 +6,7 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\ServiceProvider; -use League\Flysystem\Adapter\Local as LocalAdapter; +use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter; use League\Flysystem\Filesystem as Flysystem; use League\Flysystem\MountManager; @@ -254,8 +254,8 @@ protected function publishDirectory($from, $to) protected function moveManagedFiles($manager) { foreach ($manager->listContents('from://', true) as $file) { - if ($file['type'] === 'file' && (! $manager->has('to://'.$file['path']) || $this->option('force'))) { - $manager->put('to://'.$file['path'], $manager->read('from://'.$file['path'])); + if ($file['type'] === 'file' && (! $manager->fileExists('to://'.$file['path']) || $this->option('force'))) { + $manager->write('to://'.$file['path'], $manager->read('from://'.$file['path'])); } } } From 770025c952b3b6a6f35dcfc5328d1757d5de1598 Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Fri, 26 Feb 2021 19:10:31 +0000 Subject: [PATCH 2/2] Update VendorPublishCommand.php --- src/Illuminate/Foundation/Console/VendorPublishCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/VendorPublishCommand.php b/src/Illuminate/Foundation/Console/VendorPublishCommand.php index 4b248666fe25..45efdf65e611 100644 --- a/src/Illuminate/Foundation/Console/VendorPublishCommand.php +++ b/src/Illuminate/Foundation/Console/VendorPublishCommand.php @@ -6,8 +6,8 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Arr; use Illuminate\Support\ServiceProvider; -use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter; use League\Flysystem\Filesystem as Flysystem; +use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter; use League\Flysystem\MountManager; class VendorPublishCommand extends Command