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