How do we simplify Composer's process for premium Plugins permanently?

After building 8 Roots sites, here’s my experience installing premium Plugins via Composer:

Note: I am aware of the method of pulling from another separate WordPress installation. And things like Toran & Satis. But these seem like bandaids and don’t follow a decentralized approach.

  1. Download the Premium plugin from the authors website.
  2. Login to my Gitlab server.
  3. Create the repo.
  4. Mark it’s repository as a semi-private (called “Internal” in GitLab) repo because Composer chokes if it’s fully private.’
  5. Clone the empty repo to my local machine.
  6. mv the files into my repo.
  7. Push back to the repo.
  8. Navigate back to my site.
  9. Open my Composer file.
  10. Copy some code I use for adding Premium Plugins.
  11. Update it with my repo URL and vendor and Plugin name.
  12. Run composer.
  13. Activate.

Here’s an example composer file I have.

Additionally, if I want to update my Plugin I have to repeat steps 1 & 2.

And if I use the download link provided from many authors then Composer is either blocked by their server, or it expires, requiring the steps above.

I’ve consulted directly with the authors of many Plugins and found very few to be sympathetic and interested in providing Composer support, much less actually doing it. Delicious Brains and ACF being the select few.

When contrasting these steps to the standard WordPress Plugin system, I don’t see any benefit beyond being able to keep the Plugins in a config file and quickly rolling back. And both of these are features we could write custom code to introduce into WordPress if we wanted - without Composer.

So, it seems to me that while Composer is the right choice for dependency management in various Places of Bedrock and Sage it’s not the right choice for Plugins.

What do you guys think?

Using Composer doesn’t preclude managing plugins with whatever other system you might want; If you don’t like Composer, don’t use it.

The entire Roots stack is built around the philosophy of the 12-factor app, which has been described and explicitly stated here: https://roots.io/twelve-factor-wordpress/ More specifically, the use of composer in Bedrock is explained in Factor 2: Dependencies, which I encourage you to read for an in-depth discussion of the benefits.

If you really feel that composer is too onerous a solution, I encourage you to investigate alternatives, but for the time being I don’t think the Bedrock team will be considering moving away from composer.

3 Likes