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

WordPress Trac noreply at wordpress.org
Wed Apr 27 23:45:02 UTC 2016


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

Comment (by charliespider):

 re:
 > I'm really interested in your opinions here.

 The biggest problem with using Composer as a solution for WP is the sheer
 number of sites and servers that will not have it installed. Therefore the
 only viable option IMHO is to bake an autoloader into core.

 PSR-4 plus a class map for nonconformists would be good (PSR-4 only would
 be ideal IMHO) and we shouldn't even consider PSR-0 as it is deprecated
 (because isn't WP the target of enough jokes in the PHP community already?
 I mean seriously? "Hey everyone... we just took a giant step forward into
 the future... and adopted a deprecated system for autoloading!!!" ya no
 one is going to mock that!).

 > we shouldn't allow for registration of custom autoload rules

 Totally agree. Allowing a free for all will just make it harder to control
 everything (especially if this ever ventures into the realm of dependency
 management). I would go a step further and not even allow a class map, so
 themes and plugins have the option of converting to PSR or continuing to
 do things on their own.

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


More information about the wp-trac mailing list