[wp-trac] [WordPress Trac] #56788: PHP 8.0: improvements to allow for named parameters in WP 6.2

WordPress Trac noreply at wordpress.org
Tue Jan 24 16:03:41 UTC 2023


#56788: PHP 8.0: improvements to allow for named parameters in WP 6.2
-------------------------------------------+-----------------------------
 Reporter:  SergeyBiryukov                 |       Owner:  SergeyBiryukov
     Type:  task (blessed)                 |      Status:  accepted
 Priority:  normal                         |   Milestone:  6.2
Component:  General                        |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  php8 has-patch has-unit-tests  |     Focuses:
-------------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"55131" 55131]:
 {{{
 #!CommitTicketReference repository="" revision="55131"
 Code Modernization: Rename parameters that use reserved keywords in
 `phpunit/tests/kses.php`.

 While using reserved PHP keywords as parameter name labels is allowed, in
 the context of function calls using named parameters in PHP 8.0+, this
 will easily lead to confusion. To avoid that, it is recommended not to use
 reserved keywords as function parameter names.

 This commit renames the `$global` parameter to `$global_name` in
 `Tests_Kses::test_kses_globals_are_defined()`.

 Follow-up to [52229], [54203], [55090].

 Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
 See #56788.
 }}}

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


More information about the wp-trac mailing list