thephpleague / glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.
http://glide.thephpleague.com
MIT License
2.55k stars 198 forks source link

Flysystem v2 #300

Closed Lustmored closed 3 years ago

Lustmored commented 3 years ago

This is alternative approach to Flysystem v2 integration based on discussion in #291.

For now it's just a draft as none of the tests are refactored to handle new interfaces. Before touching them I'd love to hear opinions about code changes. I had no idea for better ResponseFactoryInterface, open to suggestions.

One important thing I might have missed some place is exception handling - Flysystem v2 changed a lot and now throws exceptions instead of returning false. I've tried to adapt to it, but probably missed a place or two.

And question about tests - how to proceed? Shall I detect available Flysystem version and check against available interfaces or write new tests for Flysystem v2 and skip those unavailable? Or maybe some other way? I think checking available interfaces is the way to go as we can then set up CI jobs to test against different Flysystem versions, but I might be wrong.

tgalopin commented 3 years ago

Closing as as discussed, we'll create a release focused on Flysystem 2 support (https://github.com/thephpleague/glide/pull/301)