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

WordPress Trac noreply at wordpress.org
Wed Nov 11 18:43:31 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 johnbillion):

 Opinion from me: I think it's unrealistic to never again change the name
 of a parameter to avoid breaking usage of named parameters. Maybe in 9 or
 12 months' time when we've had a chance to audit the whole of core then we
 can commit to that.

 I would support a statement on make/core that the project cannot guarantee
 there will be no changes to parameter names after 5.6, and anybody who
 chooses to immediately start using named parameters with PHP 8 needs to
 expect such changes in the short term.

 That said, after some cursory searching I've not found a similar statement
 from any other PHP project, possibly because PHP 8 stable isn't released
 yet. It would be interesting to know if other projects are considering
 this too.

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


More information about the wp-trac mailing list