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

WordPress Trac noreply at wordpress.org
Tue Sep 6 13:54:50 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):

 Replying to [comment:176 MikeSchinkel]:
 > Please explain how it would work, because I am in the set of people you
 say will tell me so ''(I use Composer to set up Core and plugins, often)''
 and I would not tell myself that.

 [https://github.com/composer/installers composer/installers] handles
 putting plugins into `wp-content/plugins`, themes into `wp-
 content/themes`, and mu-plugins into `wp-content/mu-plugins`, or any
 location one wishes to configure in the root `composer.json`. Any package
 may define its type as `wordpress-plugin|theme|mu-plugin` and it will get
 installed in the correct location and all autoloading will simply work as
 expected.

 This is all kind of beside the point of this ticket, as the goal point of
 this ticket is to add an autoloader for ''core'' to use, not
 plugins/themes (obviously, we don't want to preclude that enhancement
 later).

 Replying to [comment:167 rmccue]:
 > I still think this seems to be a solution (Composer) searching for a
 problem.

 I've spent the long weekend mulling over this and really thinking about it
 and at this point I think you're mostly right. We've already figured out
 that stock composer out of the box is not a solution that fits core's
 needs very well. It's flexible enough that plugins could make it fit,
 sure, but at that point, we've almost definitely over-complicated things
 and need to ask ourselves why we're shaving this darn yak in the first
 place.

 I still think it would be useful to use composer eventually, but this is
 mostly because I'm thinking of the possible uses for, say, adding dev
 dependencies like a specific version of phpunit, etc. However, such use
 cases are clearly out of scope for this ticket.

 Besides, a home-grown autoloader now does not necessarily preclude using
 composer down the road if it starts to make more sense later,
 ''especially'' if we're careful about what the integration points look
 like for 3rd party code.

 @schlessera @TJNowell What are your thoughts? you know how much I would
 love to use composer; but 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?

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


More information about the wp-trac mailing list