[wp-trac] [WordPress Trac] #48082: Replace `dirname(__FILE__)` with `__DIR__` (Performance improvement, massive patch)

WordPress Trac noreply at wordpress.org
Thu Sep 19 23:58:43 UTC 2019


#48082: Replace `dirname(__FILE__)` with `__DIR__` (Performance improvement,
massive patch)
-------------------------+--------------------------------------------
 Reporter:  ayeshrajans  |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |     Focuses:  performance, coding-standards
-------------------------+--------------------------------------------
Changes (by desrosj):

 * keywords:  needs-refresh => has-patch
 * version:  trunk =>


Comment:

 Thanks for this one, @ayeshrajans!

 At first glance, your patch also updates external libraries included in
 WordPress (SimplePie, Requests, etc.). Because these libraries are
 maintained elsewhere and copied verbatim into the code base as much as
 possible, these would need to be changed upstream before including in
 Core.

 I have an incoming patch with those libraries skipped, and with some PHPCS
 fixes.

 I have set up a branch on my fork and it shows the tests passing: https
 ://travis-ci.org/desrosj/wordpress-develop/builds/587250892.

 I'm tempted to tag this as 5.4 `early`, just in case there are any issues
 that may take a while to detect.

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


More information about the wp-trac mailing list