Git Product home page Git Product logo

Comments (7)

matthewgoslett avatar matthewgoslett commented on June 3, 2024

Thanks, we definitely should be returning a resource and not the StreamInterface, which we bubble down from the the Google Cloud lib - https://github.com/GoogleCloudPlatform/google-cloud-php/blob/master/src/Storage/StorageObject.php#L608

Whilst we've deviated from the interface, I'm not sure I'd like to consider it a breaking change. In the unit test, we incorrectly test for a StreamInterface, but in the actual class, we inheritdoc and say we return a resource (even though we don't).

I'm open to thoughts on this.

I'll patch it when I have a sec.
It looks like we should be calling \GuzzleHttp\Stream\GuzzleStreamWrapper:: getResource(...) to convert the StreamInterface to a PHP resource.

from flysystem-google-cloud-storage.

andris-sevcenko avatar andris-sevcenko commented on June 3, 2024

Well, if somebody is using that method and relying that to return StreamInterface, they might consider this a breaking change, if it's changed to resource :)

from flysystem-google-cloud-storage.

andris-sevcenko avatar andris-sevcenko commented on June 3, 2024

Any progress on this one?

from flysystem-google-cloud-storage.

matthewgoslett avatar matthewgoslett commented on June 3, 2024

I've merged this into master now.
Will push this into a 5.0.0 release.

from flysystem-google-cloud-storage.

tmirks avatar tmirks commented on June 3, 2024

This breaks MountManager::copy() which passes the buffer up to Filesystem::writeStream() and subsequently throws an exception.

I can confirm that the latest commit fixes this issue.

from flysystem-google-cloud-storage.

andris-sevcenko avatar andris-sevcenko commented on June 3, 2024

Yup. Hoping for a 5.0 release soon.

from flysystem-google-cloud-storage.

matthewgoslett avatar matthewgoslett commented on June 3, 2024

I've pushed a new major, 5.0.0 with the above fix.

https://github.com/Superbalist/flysystem-google-cloud-storage/releases/tag/5.0.0

Thanks!

from flysystem-google-cloud-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.