Skip to content

Commit

Permalink
[9.x] Fixing the Error : Class "League\Flysystem\Adapter\Local" not f…
Browse files Browse the repository at this point in the history
…ound (#36407)

* [9.x] Fixing the Error : Class "League\Flysystem\Adapter\Local" not found

This is related to the new Flysystem v2 (Check the PR #33612)

* Update VendorPublishCommand.php
  • Loading branch information
arcanedev-maroc authored Mar 1, 2021
1 parent 2eb476b commit 347dc5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Foundation/Console/VendorPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Adapter\Local as LocalAdapter;
use League\Flysystem\Filesystem as Flysystem;
use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter;
use League\Flysystem\MountManager;

class VendorPublishCommand extends Command
Expand Down Expand Up @@ -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']));
}
}
}
Expand Down

0 comments on commit 347dc5b

Please sign in to comment.