[wp-trac] [WordPress Trac] #22316: Plugin Dependencies (Yet Another Plugin Dependencies Ticket)

WordPress Trac noreply at wordpress.org
Tue Oct 31 11:33:07 UTC 2017


#22316: Plugin Dependencies (Yet Another Plugin Dependencies Ticket)
--------------------------+------------------------------
 Reporter:  Viper007Bond  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  3.4.2
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+------------------------------

Comment (by tazotodua):

 I will add my thoughts, probably they are worth to be said (I dont talk
 about "Plugin dependency") :


 There are many frameworks (like Visual-Composer, Gantry or many other PHP
 libraries and frameworks).
 On WordPress repository, maybe thousands of themes/plugins use the same
 package...
 Thus while I have 20 plugins and 5 themes installed on my site, i have
 same library installed 5-10 times (in individual plugin/theme folders).

 What if WordPress created a flexible repository for Frameworks/libraries,
 that can be called from plugins/themes easily. For example, in "my-xyz-
 plugin".
 {{{#!php
 <?php
 /*
    Plugin Name: My XYZ Plugin
    ....
 */

 wp_include_framework('guzzle', '4.15');

 ...
 ...
 ?>
 }}}

 so, the "wp_include_framework" should be native WP function, which will do
 the following (phseudo-code):

 {{{
 function wp_include_framework($name, $version){
   check if folder doesnt exist
   if(!is_dir(ABSPATH.'/wp-content/frameworks/guzzle/4.15/')){
     download_and_unzip("svn.wordpress.org/frameworks/guzzle/4.15.zip");
     }
   include_once(ABSPATH.'/wp-content/frameworks/guzzle/4.15/loader.php');
 }
 }}}

 So, advantages:
 * when framework is updated by vendor, then all of the plugin(or theme)
 developers dont have to download them by theselves.
 * plugin developers only submit 1 changed line in the code `(i.e. 4.16)`
 without submitting whole library to SVN (which obviously causes overload
 of WP SVN LOGS & REVISION SYSTEM)
 * the `SVN.WORDPRESS.ORG/FRAMEWORKS` (or whatever it will be) will be much
 more visible place, where volunteers can monitor&fix security issues.
 * WP repository will need take less space :) (maybe, not a big deal, but
 ...)
 * I dont know what "cons" does that idea has.

 This was the key of the success of Composer, right?  Wont the Management
 system take WP to new level?

 p.s. if someone need to explicitly include the library into own
 plugin/theme folder, he can still do that of course.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/22316#comment:74>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list