[wp-trac] [WordPress Trac] #51553: PHP 8.0: code improvements to allow for named parameters in function calls

WordPress Trac noreply at wordpress.org
Sat Oct 17 03:09:21 UTC 2020


#51553: PHP 8.0: code improvements to allow for named parameters in function calls
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:  (none)
     Type:  task (blessed)                       |      Status:  new
 Priority:  normal                               |   Milestone:  5.6
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion php8 needs-dev-note      |     Focuses:  coding-
  has-patch                                      |  standards
-------------------------------------------------+-------------------------

Comment (by jrf):

 @ayeshrajans Any and all help on this ticket is very very welcome as it
 will be huge undertaking to still get this done for the WP 5.6 release.

 Might be a good idea for people to leave a note here about what task they
 are working on and which files/directories for that task, so we can
 prevent duplicate work.

 The linked PR addresses Task 1 completely and where there was overlap, a
 few issues from Task 2-2.

 I've also updated the sniff to include `self` and `parent`. While these
 are not reserved keywords, they can be equally confusing in the context of
 function calls using named arguments.

 I've updated the gist with the latest scan results for Task 2-2 (based
 `trunk` + on the above patch):
 https://gist.github.com/jrfnl/a42f06ec032b0d7911cba32a72ea99ff

 > Looking at random files in WP core, it probably would help to establish
 some guidelines for task 2.1 (meaningful parameter names).

 I agree that would be very useful. Input and suggestions welcome.

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


More information about the wp-trac mailing list