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

WordPress Trac noreply at wordpress.org
Thu Aug 8 20:05:31 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 azaozz):

 Replying to [comment:36 justlevine]:

 > While I definitely want to see overloading as well (and as soon as
 possible)

 Seems the term "overloading" may be misunderstood? This is not the OOP
 overloading of methods in a particular class. Here overloading refers to
 overriding, i.e. replacing the file where a class is defined. That would
 replace portion of the WordPress code with some arbitrary code that cannot
 be maintained simultaneously with the rest of the core code.

 A basic example of a "disaster waiting to happen" situation is when a
 plugin replaces the definition of a core class, and in the next WP release
 that class is updated and contains few new methods. Assuming that the
 plugin is also updated, if there is any misalignment between the core
 update and the plugin update, the sites with that misalignment will be
 likely to throw fatal errors. If this was done in a "popular" plugin,
 there may be millions of sites throwing fatal errors because of that.

 What if the plugin was not updated?

 I'm with @jorbin here. Unfortunately unless overriding/replacement of code
 files is made impossible this would be better as "wontfix".

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


More information about the wp-trac mailing list