RubixML / Extras

Experimental features for the Rubix ML library.
https://rubixml.com
MIT License
10 stars 6 forks source link

flysystem compatibility #9

Closed simplechris closed 3 years ago

simplechris commented 3 years ago

Hey Andrew!

This makes the library compatible with projects/frameworks that are still using still Flysystem 1.x

It adds some runtime checks to detect what version is available to the current project and conditionally defines the Rubix\ML\Persisters\Flysystem class accordingly. Obviously not 100% ideal, but will increase compatibility which was perhaps blocking some users from using Rubix.

I had previously experimented setting a constant within constants.php but that approach would evaluate on every single request, whereas this approach only performs the checks when the Flysystem classes are used. Happy to change the implementation if you'd prefer a different approach.

github-actions[bot] commented 3 years ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅