8000 [9.x] Fixing the Error : Class "League\Flysystem\Adapter\Local" not f… · laravel/framework@347dc5b · GitHub
[go: up one dir, main page]

Skip to content

Commit 347dc5b

Browse files
[9.x] Fixing the Error : Class "League\Flysystem\Adapter\Local" not found (#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
1 parent 2eb476b commit 347dc5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Foundation/Console/VendorPublishCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use Illuminate\Filesystem\Filesystem;
77
use Illuminate\Support\Arr;
88
use Illuminate\Support\ServiceProvider;
9-
use League\Flysystem\Adapter\Local as LocalAdapter;
109
use League\Flysystem\Filesystem as Flysystem;
10+
use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter;
1111
use League\Flysystem\MountManager;
1212

1313
class VendorPublishCommand extends Command
@@ -254,8 +254,8 @@ protected function publishDirectory($from, $to)
254254
protected function moveManagedFiles($manager)
255255
{
256256
foreach ($manager->listContents('from://', true) as $file) {
257-
if ($file['type'] === 'file' && (! $manager->has('to://'.$file['path']) || $this->option('force'))) {
258-
$manager->put('to://'.$file['path'], $manager->read('from://'.$file['path']));
257+
if ($file['type'] === 'file' && (! $manager->fileExists('to://'.$file['path']) || $this->option('force'))) {
258+
$manager->write('to://'.$file['path'], $manager->read('from://'.$file['path']));
259259
}
260260
}
261261
}

0 commit comments

Comments
 (0)
0