-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Trac #61574 - remove some more redundant code/docs #6975
Trac #61574 - remove some more redundant code/docs #6975
Conversation
What with the minimum supported PHP version currently being PHP 7.2.x, this check has become redundant.
This commit removes various comments containing "hints" of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons (see below), so have no value. Some typical reasons: * Even though a function could be turned into a closure, removing the function would be a BC-break which is not acceptable, so this suggestion is not actionable. * Short ternaries are forbidden by the coding standard exactly to prevent the faulty code suggested in the comment from getting into the codebase.
This commit removes various comments referencing PHP versions which are no longer supported. These PHP version references have no value anymore no support for those PHP versions has been dropped.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This commit reverts the code to the code from before the bug fix related to PHP 5.2.6-5.2.17. As support for PHP 5.2 has been dropped, the work-around for the PHP 5.2 bug is no longer needed. Refs: * 78789be * SVN commit 38017
cdbe1f3
to
8826ea3
Compare
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look great! Thank you.
This is perhaps outside of the scope of this ticket/PR, but I was wondering what's your opinion on simplifying methods such as \WpOrg\Requests\Utility\InputValidator::is_iterable
to use the now-available is_iterable
.
I also noticed a few substr(PHP_OS, 0, 3)
checks that we can simplify with (PHP 7.2+) PHP_OS_FAMILY
. Perhaps in a separate ticket? because these are not strictly removals.
Well, for one, Requests is an external library, so that's out of scope. Additionally, Requests still has a PHP 5.6 minimum, so again, no go.
That sounds like a perfectly sensible change to make and would really simplify some code snippets. In my opinion, it's fine to do that under the same ticket umbrella as it's along the same lines, i.e. "removing work-arounds which were needed to support PHP < 7.2". |
Remove redundant PHP version check
What with the minimum supported PHP version currently being PHP 7.2.x, this check has become redundant.
Docs: remove redundant comments [1]
This commit removes various comments containing "hints" of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons (see below), so have no value.
Some typical reasons:
Docs: remove redundant comments [2]
This commit removes various comments referencing PHP versions which are no longer supported. These PHP version references have no value anymore now support for those PHP versions has been dropped.
wp_is_ini_value_changeable(): minor simplification
This commit reverts the code to the code from before the bug fix related to PHP 5.2.6-5.2.17.
As support for PHP 5.2 has been dropped, the work-around for the PHP 5.2 bug is no longer needed.
Refs:
Trac ticket: https://core.trac.wordpress.org/ticket/61574
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.