[wp-trac] [WordPress Trac] #60504: Plugin dependencies: Account for mu-plugin as dependency

WordPress Trac noreply at wordpress.org
Tue Feb 20 23:05:18 UTC 2024


#60504: Plugin dependencies: Account for mu-plugin as dependency
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.5
Component:  Upgrade/Install                      |     Version:  trunk
 Severity:  critical                             |  Resolution:
 Keywords:  needs-testing dev-feedback has-      |     Focuses:
  patch has-unit-tests                           |
-------------------------------------------------+-------------------------
Changes (by knutsp):

 * keywords:  dev-feedback 2nd-opinion => needs-testing dev-feedback has-
     patch has-unit-tests


Comment:

 Replying to [comment:10 peterwilsoncc]:
 > For a new feature, I don't think requiring developers add code to
 declare the dependency is overly helpful. The onus should be on WordPress
 to handle these things rather than plugin developers.

 How do you suggest finding or defining the plugin slug of a directly
 loaded MU-plugin? Naming the PHP file is only a convention, not a rule (I
 use index.php as main). Only for those loaded by a loader file, one can
 assume the directory basename is the slug, as for normal plugins.

 Installing and updating MU plugins is not supported by WP Admin UI. You
 need skills beyond a plain site admin. There will be reasons for chosing
 to load a publicly available, by UI installable, plugin as a must-use, but
 then not to for a dependent plugin.

 Directly loading complex plugins with subdirectories is not really
 supported (dirname conflicts) so you need a loader file, and that is
 written by a programmer, or pretender.

 Plugin developers may add a snippet in readme.

 To require a loader file with an embedded filter to make it fill it's role
 as dependency for normal plugins, and when well documented, seems fine to
 me.

 Future: WP comes with a default MU loader file, ready to edit down to a
 line (like wp-config.php), with filters built in for an array of plugins
 by [ slug => dirname/filename.php, ].

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


More information about the wp-trac mailing list