humanmade / Backdrop

Backdrop is a simple library that does one thing: allows you to run one-off tasks in the background.
GNU General Public License v2.0
46 stars 5 forks source link

Add composer compatibility #7

Closed matthistuff closed 9 years ago

matthistuff commented 10 years ago

I'd love to see composer compatibility to make adding this to my projects easier. I added an example composer.json and enabled psr-4 autoloading.

The only downside of this approach ist that the AJAX action handler has to be registered manually:

require_once( __DIR__ . '/vendor/autoload.php' );

\HM\Backdrop\Backdrop::init();
dimadin commented 9 years ago

Is there a reason this wasn't implemented and was closed?

I am too using it in some projects but it needs to be copied and included manually and you need to check to prevent "already declared" errors if used in 2+ plugins.