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

WordPress Trac noreply at wordpress.org
Thu Aug 8 18:08:19 UTC 2024


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

Comment (by jorbin):

 I think any autoloader needs to make it so that files can not be
 overloaded and if that's not possible, this ticket should be closed as
 `wontfix`. Allowing extenders to override core files means:

 1) Core can't rely on functionality existing from one version to another
 in a different file. This will cause sites to break on upgrade.

 2) Since a core file can be overridden once, it makes it harder for
 multiple plugins to extend the same functionality.

 3) Instead of encouraging collaboration and making WordPress better,
 plugins will just override core files to fix a bug they are facing since
 it will be easier for them.

 While the intent isn't to allow plugins to override files, the fact that
 this is a possibility makes the idea of an autoloader one that won't
 benefit the end users of WordPress.

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


More information about the wp-trac mailing list