Hacker News new | ask | show | jobs
by codelust 4572 days ago
Congrats. This looks pretty neat, especially since it uses Composer.

Does it do the whole autoloader song and dance with Composer?

Example: If I add Guzzle to Composer, can I call it from my plugin's code the way you can with other frameworks?

Only thing I would change is to swap out Capistrano with Fabric. But that's a personal choice.

3 comments

The autoloader is required in wp-config to get access to Dotenv: https://github.com/roots/bedrock/blob/master/wp-config.php#L...

But in the example you gave, ideally your custom plugin is itself a Composer package which requires Guzzle in its composer.json file. Then you'd require your plugin in the project's composer.json :)

Re: Capistrano. We're really trying to encourage people to fork this and modify it to their needs. So you could easily rip Cap out and integrate Fabric in your own fork. We're just providing some sensible defaults that we're familiar with.

I know it's just an example, but: if you're doing HTTP in WordPress, please use WP HTTP rather than Guzzle. It has compatibility with many more hosts (since it uses sockets as well as cURL), plus it's already built-in.
nice pun: "song and dance with Composer"