Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[9.x] Flysystem v2 #33612
[9.x] Flysystem v2 #33612
Conversation
} | ||
|
||
return $driver; | ||
return $this->customCreators[$config['driver']]($this->app, $config); |
driesvints
Jul 24, 2020
•
Author
Member
These changes require custom creators to return an instance of Illuminate\Contracts\Filesystem\Filesystem
rather than an instance of League\Flysystem\FilesystemInterface
. The reason for that is that creating a FilesystemAdapter
instance is now much more complex than what the previous adapt
method did (see a bit further below).
These changes require custom creators to return an instance of Illuminate\Contracts\Filesystem\Filesystem
rather than an instance of League\Flysystem\FilesystemInterface
. The reason for that is that creating a FilesystemAdapter
instance is now much more complex than what the previous adapt
method did (see a bit further below).
d6a20ae
to
81851e5
Fixed. |
8f679ed
to
ee36968
Initial attempt at migrating to (currently unreleased) Flysystem v2. Might be a little too soon for Laravel 8. In draft until Flysystem v2 has been released.
Breaking Changes
put
,write
,writeStream
, etc) now overwrite by default. Checking for existing files needs to be done in user land from now on.writeStream
no longer throws aFileExistsException
. Since this exception is nowhere used anymore in the framework, it's been removed.get
&readStream
no longer throw aFileNotFoundException
exception when a file exists. This is because the underlying Flysystem integration no longer distinguishes this specific failure from any other read failure. Both methods will returnnull
when they cannot read a file.delete
returnstrue
now even if the file wasn't found.Illuminate\Contracts\Filesystem\Filesystem
rather thanLeague\Flysystem\FilesystemInterface
like before. See #33612 (comment)Illuminate\Filesystem\FilesystemAdapter
's constructor now requires an extra$adapter
argument and an optional$options
argument.