[wp-trac] [WordPress Trac] #51553: PHP 8.0: code improvements to allow for named parameters in function calls
WordPress Trac
noreply at wordpress.org
Fri Jul 9 17:30:04 UTC 2021
#51553: PHP 8.0: code improvements to allow for named parameters in function calls
-------------------------------------------------+-------------------------
Reporter: jrf | Owner:
| hellofromTonya
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 5.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: php8 has-patch needs-docs needs- | Focuses: coding-
codex early | standards
-------------------------------------------------+-------------------------
Comment (by jrf):
@hellofromTonya and me worked on this ticket today during
[https://youtu.be/fTgTUd2_J00 our livestream session].
We basically actioned all open remarks for [https://github.com/WordPress
/wordpress-develop/pull/612 GitHub PR 612]. If the build passes, this
should now be ready to commit.
To summarize what we've done:
* Where relevant we've added an assignment at or near the top of the
function back to the old variable name.
* In all cases where such re-assignments were done (previously and the
newly added ones), we've added a comment explaining the re-assignment with
a reference to this ticket.
* In a few select cases were the variable would only be used once in the
function, mostly in function calls, we've made the choice to change such
function calls to multi-line and to explain things in a trailing comment
for the passed parameter.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51553#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list