I’m using Bedrock with Capistrano to deploy. All is well. Most of my WP plugins are included as dependencies in composer.json. Some of the plugins I needed were unavailable on wpackagist, so I either included them as git subtrees and then added exceptions to gitignore so they’d be included in the repo (probably a better way to do this?), or just added the source and then added the exception in gitignore.
I have one custom plugin though, and I am using Composer with PSR-4 autoloading. This plugin sits in web/app/plugins/plugin-name/ and it has its own composer.json. When I deploy with capistrano, nothing works until I manually go into this plugin’s directory and run composer update, presumably because the vendor directory and the autoloading functionality isn’t being deployed along with the rest of the plugin.
How can I accomplish this? A site built with Bedrock, deployed with Capistrano, containing a custom plugin which itself uses Composer and PSR-4 autoloading.
Sorry in advance if this is glaringly obvious and I’ve missed something I shouldn’t have, and let me know if there’s anything I need to clarify on or anything.
As mentioned above, I’m pretty sure there is a better way to handle those plugins I’m using which are not available within wpackagist, but which are available on github. I’d like to address this issue and figure out the correct way to include them (rather than just adding them as a git subtree and then adding an exception within gitignore as I am now), but my primary concern is figuring out what to do about this custom plugin I’ve written which is using PSR-4 and Composer, as it is preventing me from being able to do a one-step deploy with Capistrano since I have to manually go into the plugin’s directory and run composer update each time I deploy.