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.
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.