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

WordPress Trac noreply at wordpress.org
Tue Sep 6 14:17:26 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 chrisvanpatten):

 Replying to [comment:180 JohnPBloch]:
 > [...] isn't it starting to seem to you that the work spent bending
 composer into a WP shape would be better spent sculpting WP into something
 a tiny bit more composer-shaped?

 I think there's a lot of sense in this final point. But if that's a
 generally shared conclusion, is there any point in pursuing a custom
 autoloader at all at this stage?

 I think there's a lot of merit to the concerns about the "political"
 implications of a non-Composer autoloader. Sure, Core "could" switch to
 Composer at some point, but—if we're honest with ourselves—will that
 _really_ happen? Or will the custom autoloader become more entrenched,
 start to serve as a template for less experienced developers who adopt
 variations of it in their own work, and ultimately become so ingrained as
 "The WordPress Way" that a Composer autoloader changes from "some day" to
 "no way"?

 If the goal is to—over dozens of cycles—make WordPress more consistent
 with generally accepted PHP best practices, what's the gain right now from
 putting in code—and creating technical debt—that's out of line with those
 best practices?

 I'm not saying there isn't merit to a non-Composer autoloader, just that
 it seems like this is the kind of thing where it might be better to avoid
 an autoloader entirely and push for improvements in other areas… renaming
 classes, getting some kind of consistent hierarchy in place, pushing for
 5.3 version minimum and namespaces, etc. That might take a while, but it
 seems like that groundwork is necessary anyway to really get the _most_
 value out of an autoloader.

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


More information about the wp-trac mailing list