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

WordPress Trac noreply at wordpress.org
Wed Aug 31 20:20:37 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):

 Replying to [comment:139 azaozz]:
 > > The design in `pluggable.php` is /bad/ because it only allows 1
 opportunity to intercept, with no additional way to verify or override the
 decisions made before you.
 > I don't see any difference with the current autoloading. The first
 plugin to `require` a class wins, any other plugins will not be able to
 replace it any more, and will trigger fatal errors.

 The difference is not in the result of doing it wrong. The difference is
 in the fact that "replacing autoloaded core classes" is not a mechanism
 provided to developers.

 Replacement mechanism => plugin breaks core by replacing => replacement
 mechanism design at fault
 No replacement mechanism => plugin breaks core by replacing => plugin at
 fault

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


More information about the wp-trac mailing list