Skip to content

Commit b1ff5c1

Browse files
committed
Drop legacy Flysystem 1 code
1 parent 995cafe commit b1ff5c1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Generator.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Illuminate\Routing\Router;
1010
use Illuminate\Support\Arr;
1111
use League\Flysystem\Filesystem as Flysystem;
12+
use League\Flysystem\Local\LocalFilesystemAdapter;
1213
use Statamic\Contracts\Imaging\UrlBuilder;
1314
use Statamic\Facades\Collection;
1415
use Statamic\Facades\Entry;
@@ -120,13 +121,8 @@ public function bindGlide()
120121

121122
$directory = Arr::get($this->config, 'glide.directory');
122123

123-
// Determine which adapter to use for Flysystem 1.x or 3.x.
124-
$localAdapter = class_exists($legacyAdapter = '\League\Flysystem\Adapter\Local')
125-
? $legacyAdapter
126-
: '\League\Flysystem\Local\LocalFilesystemAdapter';
127-
128124
$this->app['League\Glide\Server']->setCache(
129-
new Flysystem(new $localAdapter($this->config['destination'].'/'.$directory))
125+
new Flysystem(new LocalFilesystemAdapter($this->config['destination'].'/'.$directory))
130126
);
131127

132128
$this->app->bind(UrlBuilder::class, function () use ($directory) {

0 commit comments

Comments
 (0)