spatie / flysystem-dropbox

A flysystem driver for Dropbox that uses the v2 API
https://freek.dev/734-dropbox-will-turn-off-v1-of-their-api-soon-its-time-to-update-your-php-application
MIT License
343 stars 50 forks source link

Use generator in listContents call for upstream compliance. #66

Closed BusterNeece closed 3 years ago

BusterNeece commented 3 years ago

Been looking into an error I found with this adapter, only to discover that while it's okay for 90% of use cases to return an array on the listContents call, as arrays are indeed iterable things, if you do things like $filesystem->listContents()->filter(function() { }), then it requires that it returns an iterator.

I also fixed a very silly error I discovered (likely my own fault from previous iterations) that mistakenly passed $path as the second parameter ($deep for recursive searches).

freekmurze commented 3 years ago

Thank you!