Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP/DeprecatedParameterValues: support modern PHP + update for WP 6.1 #2174

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 21, 2022

WP/DeprecatedParameterValues: add support for PHP 8.0+ named parameters

  1. Adjusted the way the correct parameters are retrieved to use the new PHPCSUtils 1.0.0-alpha4 PassedParameters::getParameterFromStack() method.
  2. Verified the parameter names used are in line with the name as per the WP 6.1 release.
    WP has been renaming parameters and is probably not done yet, but it doesn't look like those changes (so far) made it into changelog entries....
    For the purposes of this exercise, I've taken the current parameter name as the "truth" as support for named parameters hasn't officially been announced yet, so any renames after this moment are the only ones relevant.

Includes a change to the array format to allow for recording the parameter name.

Includes additional unit tests.

WP/DeprecatedParameterValues: verify against WP Core

Updated the array of parameters and values to search for based on a review of all calls to the _deprecated_argument() function in WP Core.

Includes tests.

Refs:

1. Adjusted the way the correct parameters are retrieved to use the new PHPCSUtils 1.0.0-alpha4 `PassedParameters::getParameterFromStack()` method.
2. Verified the parameter names used are in line with the name as per the WP 6.1 release.
    WP has been renaming parameters and is probably not done yet, but it doesn't look like those changes (so far) made it into changelog entries....
    For the purposes of this exercise, I've taken the _current_ parameter name as the "truth" as support for named parameters hasn't officially been announced yet, so any renames _after_ this moment are the only ones relevant.

Includes a change to the array format to allow for recording the parameter name.

Includes additional unit tests.
Updated the array of parameters and values to search for based on a review of all calls to the `_deprecated_argument()` function in WP Core.

Includes tests.

Refs:
* https://developer.wordpress.org/reference/functions/add_option/
* https://developer.wordpress.org/reference/functions/get_option/
* https://developer.wordpress.org/reference/functions/update_option/
Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GaryJones GaryJones merged commit ed98c20 into develop Dec 21, 2022
@GaryJones GaryJones deleted the feature/deprecatedparamvalues-phpcsutils-and-modern-php-wp-61 branch December 21, 2022 14:30
@jrfnl jrfnl mentioned this pull request Jan 7, 2023
19 tasks
@jrfnl jrfnl mentioned this pull request Aug 20, 2023
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants