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

#63052 Unblock the upgrade pre-flight check on WordPress < 5.1 #8457

Closed
wants to merge 4 commits into from

Conversation

johnbillion
Copy link
Member

@johnbillion johnbillion commented Mar 4, 2025

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 in update_core() which is in the wp-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.

@johnbillion johnbillion marked this pull request as ready for review March 4, 2025 16:43
Copy link

github-actions bot commented Mar 4, 2025

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props johnbillion.

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.

Copy link
Member

@joemcgill joemcgill left a 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'
Copy link
Member

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.

Copy link
Member Author

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.

@johnbillion johnbillion requested review from joemcgill and desrosj March 5, 2025 15:50
Copy link

github-actions bot commented Mar 9, 2025

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 59956
GitHub commit: 0b06068

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions bot closed this Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants