[wp-trac] [WordPress Trac] #36335: Next generation: core autoloader proposal

WordPress Trac noreply at wordpress.org
Fri Nov 4 23:48:01 UTC 2022


#36335: Next generation: core autoloader proposal
-----------------------------+------------------------------
 Reporter:  dnaber-de        |       Owner:  (none)
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------

Comment (by jqz):

 Replying to [comment:259 jqz]:
 > Replying to [comment:258 omaeyusuke]:
 > Don't we also need the package installer component of Composer?

 And the version management bit that determines the most suitable version
 of a package to install from the various `composer.json` files that list
 it as a dependency (or otherwise determine that there is a version
 conflict that can't be satisfied)?

 I would imagine that plugin/theme authors would just provide a
 `composer.json` file and WordPress would take care of the rest:
 downloading suitable dependencies into a folder within the site's
 directory tree; setting up autoloaders; and rejecting activation of a
 plugin/theme in cases where the dependencies can't be satisfied due to a
 version requirement conflict (supplying the Composer log so the admin can
 as fully as possible understand the issue).

 I don't know if there's a way to supply Composer with multiple
 `composer.json` files to resolve, but I think that's all we need, and its
 existing functionality should be easily adaptable to support that, since
 that's what it does when resolving dependencies of directly referenced
 dependant packages.

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


More information about the wp-trac mailing list