[wp-trac] [WordPress Trac] #36926: Autoloading: Introduce compatibility shim for spl_autoload_register

WordPress Trac noreply at wordpress.org
Tue May 24 04:36:12 UTC 2016


#36926: Autoloading: Introduce compatibility shim for spl_autoload_register
-----------------------------------+------------------
 Reporter:  rmccue                 |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  4.6
Component:  General                |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------
Changes (by rmccue):

 * keywords:   => has-patch 2nd-opinion
 * milestone:  Awaiting Review => 4.6


Comment:

 Added an actual patch for core; renamed from `$spl_autoloaders` to
 `$_wp_spl_autoloaders` to indicate that a) it's part of a shim and
 shouldn't be used, and b) to avoid any potential variable conflicts. While
 we could introduce a class with protected/private vars to actually protect
 it, that's too much overhead for just a shim, especially one that's only
 loaded on a small number of installs.

 This doesn't really introduce any new stuff into core, apart from the
 compatibility shim for 5.2, so it should be pretty uncontroversial. Core
 ''does'' actually use this with the introduction of Requests, plus we can
 remove the check in the SimplePie loader (see [attachment:36926.2.diff].
 Based on this, I'd like to get it into core this cycle, regardless of
 progress on #36335 (although I hope we can get that in too!).

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


More information about the wp-trac mailing list