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

WordPress Trac noreply at wordpress.org
Fri Sep 2 05:13:31 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 jb510):

 First, I read this whole thread and learned a lot. I really wish more trac
 tickets had such intelligent discussion. TY to all of you.

 Replying to [comment:150 MikeSchinkel]:
 > > is an effort to bring de facto PHP best practices to WordPress, trying
 to get it out of the "legacy software" drawer it keeps getting put into
 more and more.
 >
 > See [/ticket/37699#comment:66 my comments ''(to you)'' here] about there
 being different levels of programmers and how we should not be forcing all
 of them to be at the highest skill level.
 >
 > Think of them as diffferent constituents, all of which we should guard
 their interests and not forsake any of them.

 As one of the those in the "different levels of programmers" group. I
 don't see how adding an autoloader to core would hurt my ability, or my
 fellow novice and intermediates, from working with WordPress.  For the
 most part novice and intermediate level developers expect core to "just
 work" out fo the box and it does so with or without an autoloader.

 In fact I feel like most new developers are coming to WP having learned
 current best practices elsewhere (Zend/Laravelle) so they are more
 confused when they discover WP doesn't do things more modern (advanced)
 way. Adopting an auto-loader might even help the them.  Really though my
 point is I don't think developer expertise issue really comes into play
 when we're talking about core until you get really freaky.

 If/when plugin devs can later leverage a core loader I think it would
 further help those same programmers since they'd start seeing things done
 in a similar way across multiple plugins, rather than the anarchy that
 currently exists (most often seems to be using Composer, but I see weird
 bespoke systems too).
 ----
 While it sounds like the goal of this ticket is simply an auto loader for
 core (yay for narrow focus) and that the likely candidate for the is
 Composer while still considering other options.  A point I'm unclear on at
 this point in the discussion is about use outside of core which I think
 needs at least superficial consideration.

 If the answer is based on composer. Is the thought that plugin/theme
 developers could then leverage composer directly from core to create their
 own auto-loader, or is the thought that they would directly use a Core
 autoloader class?  As a middle level dev, I only really care about two
 things, 1) that how core does it works seamlessly and painlessly, and 2)
 if I can/can't/should/shouldn't leverage how core does it.

 From what I've read here, it sounds like there would be a lot of value to
 using composer in a way that plugin/theme devs could leverage it directly,
 but as a middle level developer, I'll certainly defer to the experienced
 folks here just thought an opinion from a "different group" might help.

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


More information about the wp-trac mailing list