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

WordPress Trac noreply at wordpress.org
Fri Sep 2 14:54:10 UTC 2016


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

Comment (by JohnPBloch):

 It seems to me that @MikeSchinkel's point that Composer does a lot of
 extra processing after classmaps is one worth acknowledging and
 incorporating. For core's own autoloading needs, obviously this won't be
 an issue. The performance question comes into play later for any plugins
 that might also trigger the autoloader. Because those plugin classes
 aren't in core's classmap, it would needlessly run through all the other
 autoloader checks only to predictably come up with nothing.

 To that end, I propose that we run with @schlessera's proposal to fork the
 PHP 5.2 autoloader generator and, in addition to making it use `ABSPATH`
 rather than a path relative to `composer.json`, it should strip out (i.e.,
 neglect to generate) all logic in the loading method after the class map
 until such time that core actually ''uses'' one of the autoloading PSRs
 (which is a completely different conversation).

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


More information about the wp-trac mailing list