Core plugin dependency is necessary for a better WordPress ecosystem

Categorized under:

Photo of author
Written By Brian Krogsgard

7 thoughts on “Core plugin dependency is necessary for a better WordPress ecosystem”

    • I don’t know… Composer is great if I’m both defining and enforcing the dependencies, but it’s not exactly a viable solution for plugins that would be distributed on the .org repo and/or installed through the installer.

    • @Brian Composer also requires PHP5.3+, which is a blocker for core. Of the ways I’ve seen setting up dependencies for PHP projects, Composer is the best. It’s essentially what everyone else uses.

      @John We’re part of the way there:

      • Again, I think Composer is a phenomenal way for ME or YOU to manage dependencies; I think it’s just not a viable solution for core. In order to get any benefit out of plugin dependencies, you’d have to use the WordPress installation as the base app for Composer and then dynamically add dependencies from the composer.json files in every plugin and theme to the main config file, then assume composer exists on the system (or bundle it with WP) and then run a system call to composer update/install.

        • The thing is we are too used to thinking that core is the boss in the stack. Composer can be the boss instead and treat WP core as building block like any other. It’s my opinion that there is no need to wait for WP to work with Composer, since Composer is very few short steps away from working with WP… and not caring about its opinion on the matter.

  1. Couldn’t agree more. WordPress Core needs a “package manager” like Ruby Gems, npm, NuGet, etc. For one, it would help bubble up popular and reliable plugins to the top because devs would notice the same common dependencies in packages over and over and would promote more modularity and less monolithic plugins. In Node.js examples, you see http, connect, express, etc. over and over and people use it because it works. I think this is one of the problems with the current repository of WordPress plugins – there is too much overlap. There are tons of plugins that provide the exact same functionality but differ by only a couple of features, preferences or just implementation. These common aspects should be one clean reliable module that I can “require” and have WordPress Core automatically handle activation and versioning dependency.

    WPM (WordPress Package Manager)? Yes, please!

Comments are closed.

A2 Hosting