[wp-trac] [WordPress Trac] #60414: Core PHP autoloader proposal

WordPress Trac noreply at wordpress.org
Thu Feb 1 14:08:40 UTC 2024


#60414: Core PHP autoloader proposal
-------------------------------------+-------------------------------------
 Reporter:  aristath                 |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-unit-      |     Focuses:  performance,
  tests                              |  sustainability
-------------------------------------+-------------------------------------

Comment (by aristath):

 Replying to [comment:2 justlevine]:
 > @aristath can you clarify how (if at all) this relates to the
 [[https://github.com/WordPress/Requests/blob/develop/src/Autoload.php|Autoload
 class used by Requests]]])? You mentioned in the Proposal that an API is
 outside of the scope, and I'm assuming that since Requests is also
 intended to be consumed outside of WP contexts that it'l continue to
 maintain it's own implementation, ''and'' I'm not seeing anything directly
 related in the diff,

 Check out the `WP_Autoload::register_external_bundled()` method.
 It registers the autoloaders from external libraries inside the Core
 autoloader. Hard includes/requires for these were then removed from the
 rest of the WP codebase, and the Core autoloader handles them 👍

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


More information about the wp-trac mailing list