-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
#63052 Unblock the upgrade pre-flight check on WordPress < 5.1 #8457
Conversation
…pre-flight check.
…PHP 8.4 from this, but let's see how it goes.
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 comment was marked as off-topic.
This comment was marked as off-topic.
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.
One observation, but otherwise this looks good to me.
multisite: [ false, true ] | ||
|
||
exclude: | ||
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218. | ||
- php: '7.2' | ||
db-version: '8.4' | ||
# WordPress 4.9 does not support PHP 8.4. | ||
- php: '8.4' |
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.
According to https://make.wordpress.org/hosting/handbook/compatibility/ WP 4.9 also only supports MySQL up to 5.7.
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.
Correct but it does work despite not being officially supported. The PHP 8.4 test needs to be excluded because the site exits with a fatal error due to the use of get_magic_quotes_gpc()
in 4.9.
Trac ticket: https://core.trac.wordpress.org/ticket/63052
The
WP_Error::has_errors()
method was introduced in 5.1, so it can't be used inupdate_core()
which is in thewp-admin/includes/update-core.php
file that gets copied into place over the existing one during the pre-upgrade prep.This PR replaces usage of that method with the same check for the public
errors
property that the method uses.I've added an upgrade test from WordPress 4.9, which is the oldest branch that supports PHP 7.2. If we want to test further back than this then we'll need to make some more changes to PHP version usage in the workflow file that I think can happen in a follow-up ticket.