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

WordPress Trac noreply at wordpress.org
Mon Nov 7 02:09:04 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 omaeyusuke):

 Replying to [comment:259 jqz]:
 > I don't understand this concern.  AFAIK, Composer doesn't generate any
 superfluous files.
 No, there are files that are required considering the resolution of
 dependencies on packages created by third parties, but unnecessary
 considering only the autoloader into the core (e.g., autoload_psr4.php,
 autoload_real.php, ClassLoader.php) .
 If you do not do dependency resolution for third-party created packages,
 most of them could simply be overhead if you use Composer as a whole.
 > Isn't the point of this to reduce the number of files, as well as
 eliminating version conflicts when two plugins ship with incompatible
 versions of a third-party package, by sharing common packages between
 plugins/themes, and having WordPress download and install the dependencies
 to a common folder (e.g. wp-content/packages) rather than the
 plugins/themes having to ship with separate copies of these common
 packages.
 Of course, in the long run, such a thing should be considered, but it
 should not be considered as baby steps. If we consider it in its current
 state, it could become a rehash of the logs of this ticket.
 We recognize that what should be done immediately is to implement
 autoloaders only in the core.

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


More information about the wp-trac mailing list