-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update PHP version label handling in site health check #7350
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
Update PHP version label handling in site health check #7350
Conversation
Refactor the logic for setting the PHP version label and status in the site health check. Adds a condition to handle failures in obtaining the recommended PHP version from WordPress.org, updating the label and description accordingly.
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @pbearne@git.wordpress.org. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
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. |
|
@joemcgill @SergeyBiryukov Could you please take a look when you have moment so we can commit it before RC. |
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
joemcgill
left a comment
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.
This is close, but I'm not sure this is quite right yet. My main concern is that the feedback if the wp_check_php_version() fails is not that helpful to most folks. Instead, I think we can share the current server info, but avoid giving any info about the recommended version, since it couldn't be determined and then return early before doing the other checks.
I've left some suggestions inline.
Co-authored-by: Joe McGill <801097+joemcgill@users.noreply.github.com>
The error message about communication with WordPress.org was unnecessary and has been removed. This simplifies the code and ensures clearer messaging during health checks.
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
…into 61623-don't-dispaly-good-if-call-to-wp.org-failed
|
@joemcgill Do you feel your feedback has been addressed? |
peterwilsoncc
left a comment
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.
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
|
@pbearne It looks like the last feedback is addressing what Peter found in #7350 (review) |
| /* translators: %s: The minimum recommended PHP version. */ | ||
| __( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance. The minimum recommended version of PHP is %s.' ), | ||
| $response ? $response['recommended_version'] : '' | ||
| ) |
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.
Maybe the The minimum recommended version of PHP is %s. part of this string should be removed so that this becomes instead:
| __( 'PHP is one of the programming languages used to build WordPress. Newer versions of PHP receive regular security updates and may increase your site’s performance.' ) |
Then below, the description can be appended with the current version.
Co-authored-by: Weston Ruter <westonruter@gmail.com>
…into 61623-don't-dispaly-good-if-call-to-wp.org-failed
…gnment.IncorrectWarning
@peterwilsoncc Now it shows as:
|
Previously, the status could be misleading, especially if the check against the WordPress.org API failed. The initial status message is now more neutral, and a dedicated check has been added to handle cases where the API is unreachable. Developed in #7350 Follow-up to [58832]. Props pbearne, joemcgill, mukesh27, peterwilsoncc, swb1192, krupajnanda, psykro, SergeyBiryukov, swissspidy, imranhasanraaz, amin7, flixos90, vgnavada, audrasjb, adamsilverstein, Presskopp, westonruter. Fixes #61623. git-svn-id: https://develop.svn.wordpress.org/trunk@61123 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the status could be misleading, especially if the check against the WordPress.org API failed. The initial status message is now more neutral, and a dedicated check has been added to handle cases where the API is unreachable. Developed in WordPress/wordpress-develop#7350 Follow-up to [58832]. Props pbearne, joemcgill, mukesh27, peterwilsoncc, swb1192, krupajnanda, psykro, SergeyBiryukov, swissspidy, imranhasanraaz, amin7, flixos90, vgnavada, audrasjb, adamsilverstein, Presskopp, westonruter. Fixes #61623. Built from https://develop.svn.wordpress.org/trunk@61123 git-svn-id: http://core.svn.wordpress.org/trunk@60459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the status could be misleading, especially if the check against the WordPress.org API failed. The initial status message is now more neutral, and a dedicated check has been added to handle cases where the API is unreachable. Developed in WordPress/wordpress-develop#7350 Follow-up to [58832]. Props pbearne, joemcgill, mukesh27, peterwilsoncc, swb1192, krupajnanda, psykro, SergeyBiryukov, swissspidy, imranhasanraaz, amin7, flixos90, vgnavada, audrasjb, adamsilverstein, Presskopp, westonruter. Fixes #61623. Built from https://develop.svn.wordpress.org/trunk@61123 git-svn-id: https://core.svn.wordpress.org/trunk@60459 1a063a9b-81f0-0310-95a4-ce76da25c4cd





Refactor the logic for setting the PHP version label and status in the site health check. Adds a condition to handle failures in obtaining the recommended PHP version from WordPress.org, updating the label and description accordingly.
Trac ticket: https://core.trac.wordpress.org/ticket/61623