You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
* Allow Storage::put to accept a Psr StreamInterface
Addresses: laravel/ideas#1252
* Moved psr/http-message to a suggested dependency
* Fixed error in filesystem composer.json
taylorotwell
pushed a commit
to illuminate/filesystem
that referenced
this issue
Oct 8, 2019
* Allow Storage::put to accept a Psr StreamInterface
Addresses: laravel/ideas#1252
* Moved psr/http-message to a suggested dependency
* Fixed error in filesystem composer.json
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm currently working with Guzzle and I noticed that Laravel Filesystem doesn't use streaming with classes implementing
Psr\Http\Message\StreamInterface
. At https://github.com/laravel/framework/blob/5.6/src/Illuminate/Filesystem/FilesystemAdapter.php#L164-L181is_resource()
will return false and thus Flysystemput
will be called instead ofputStream
.Flysystem::put
usesfile_put_content()
which AFAIK will implicitly cast to a string.Currently the workaround is to detach the resource from the streaminterface:
if Laravel handled the Psr7\Streaminterface I could write (and not worry about running out of memory):
Hope this makes sense and I'm not massively misunderstanding anything,
Cheers
The text was updated successfully, but these errors were encountered: