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

WordPress Trac noreply at wordpress.org
Mon Aug 29 12:36:52 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 flixos90):

 Replying to [comment:113 Clorith]:
 > This is the part that worries me, you say they shouldn't, I agree. But
 from experience, they will, they most definitely will.

 I agree with @schlessera - I don't think it's a good idea to base code
 decisions in Core on how developers might misuse it. There's always ways
 that someone can mess up WordPress by doing things in a way that are not
 intended to be handled that way. Anything like that falls under the second
 type of error condition and should fatally fail if possible (so that they
 find out it's wrong during development) or be forbidden by guidelines like
 "Writing a Plugin" (where it is already stated that one shouldn't use the
 `wp_` prefix for custom stuff).

 > Just look at 4.6 which had this with a single generically named function
 for `the_post_thumbnail_caption` which themes and plugins were already
 using, already declared function and classes means server error, this
 can't be fixed without accessing the file system in some way, which is a
 technical step many of our users are not comfortable making (and we
 shouldn't force upon them if we can avoid it).

 This is an example of exactly the above. A plugin or theme that declares
 such a function (especially without a `function_exists` check) is most
 certainly badly developed to some degree. These plugins and themes will
 always exist, and us not making it easier for them to hijack stuff will
 not make them go away.

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


More information about the wp-trac mailing list