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

WordPress Trac noreply at wordpress.org
Tue Aug 30 11:19:41 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 schlessera):

 I added a diff that shows how the custom autoloader plugin is used.

 Some notes:

 * When `case-sensitive` is set to false, both generated class maps and the
 class loader will run the class name through `mb_strtolower`. This could
 be changed to use the faster `strtolower`, in case MB support is not
 needed.
 * The `ABSPATH` constant needs to be set before the autoloader is
 included, otherwise the class map is broken.
 * This is not a final implementation, but rather a quick first version to
 show that Composer is flexible enough to adapt to any requirements. The
 code can still be optimized, and the project can also be properly
 integrated into WP codebase (runs off my personal GitHub account right
 now).

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


More information about the wp-trac mailing list