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

Build/Test Tools: Enable running the tests on PHP 8.4 (Trac: 62061) #7379

Closed

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 17, 2024

PHP 8.4 is expected to be released at the end of November 2024.

Trac ticket 62061 contains a full analysis of the changes needed for WP to be ready for PHP 8.4 and all currently available patches for WP Core have been merged in the mean time.

Enabling the tests to run in CI on PHP 8.4 allows WordPress core to prevent new PHP 8.4 compatibility issues from being introduced.

Notes:

  • While a patch has been pulled for the Importer plugin, this patch has not been merged yet.
    This means there are currently still five failing tests. These failure are directly related to the Importer plugin and will be fixed once the PR for the plugin has been merged.
    To still allow WP Core to start structurally testing against PHP 8.4, these five tests have been set up now to be skipped on PHP 8.4.
    These tests skips should be removed again once the PR to the plugin has been merged.
  • Xdebug-related tests will not be run on PHP 8.4 at this time as the Docker image for PHP 8.4 does not contain Xdebug yet. Once a stable release of Xdebug 3.4.0 is available, it can be added to the Docker image and the test step can then be enabled for PHP 8.4.

Trac ticket: https://core.trac.wordpress.org/ticket/62061


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.

Copy link

Test using WordPress Playground

The 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

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@jrfnl jrfnl force-pushed the trac-62061/ghactions-add-php-8.4 branch from 9c2883d to b8e8ce3 Compare September 27, 2024 22:44
@jrfnl
Copy link
Member Author

jrfnl commented Sep 27, 2024

Rebased without changes on current trunk so the remaining test failures can be can be clearly seen. These should only be 7 - 2 related to SimplePie, 5 related to the Importer plugins, but we'll see if anyone introduced new issues in the mean time ;-)

Note: I propose to temporarily skip those 7 tests until SimplePie and the Importer plugin are fixed and the fixes released. Enabling the test runs against PHP 8.4 and not allowing them to fail should then prevent new issues from being introduced.

@jrfnl jrfnl force-pushed the trac-62061/ghactions-add-php-8.4 branch from b8e8ce3 to 607572b Compare October 3, 2024 14:41
PHP 8.4 is expected to be released at the end of November 2024.

Trac ticket 62061 contains a full analysis of the changes needed for WP to be ready for PHP 8.4 and all currently available patches for WP Core have been merged in the mean time.

Enabling the tests to run in CI on PHP 8.4 allows WordPress core to prevent new PHP 8.4 compatibility issues from being introduced.

Notes:
* While a [patch has been pulled](WordPress/wordpress-importer#172) for the Importer plugin, this patch has not been merged yet.
    This means there are currently still five failing tests. These failure are directly related to the Importer plugin and will be fixed once the PR for the plugin has been merged.
    To still allow WP Core to start structurally testing against PHP 8.4, these five tests have been set up now to be skipped on PHP 8.4.
    These tests skips should be removed again once the PR to the plugin has been merged.
* Xdebug-related tests will not be run on PHP 8.4 at this time as the Docker image for PHP 8.4 does not contain Xdebug yet. Once a stable release of Xdebug 3.4.0 is available, it can be added to the Docker image and the test step can then be enabled for PHP 8.4.
@jrfnl jrfnl force-pushed the trac-62061/ghactions-add-php-8.4 branch from 163dab2 to d91e1ce Compare October 3, 2024 17:13
@jrfnl jrfnl requested a review from desrosj October 3, 2024 17:13
@jrfnl
Copy link
Member Author

jrfnl commented Oct 3, 2024

Update:

I've updated the commit to:

  1. Skip the failing Importer plugin tests for the time being.
  2. Add PHP 8.4 to the .version-support-php.json file for WP 6.7.
  3. Also enable test runs against PHP 8.4 for the upgrade-testing.yml workflow.

A build showing a "clean bill of health" for WP Core using the updated version of the workflow can be seen here: https://github.com/WordPress/wordpress-develop/actions/runs/11164654907

@jrfnl jrfnl marked this pull request as ready for review October 3, 2024 17:20
Copy link

github-actions bot commented Oct 3, 2024

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 jrf.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@desrosj desrosj left a comment

Choose a reason for hiding this comment

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

Thanks @jrfnl! After chatting yesterday and reviewing today, I think this is ready to go.

@desrosj
Copy link
Contributor

desrosj commented Oct 4, 2024

@desrosj desrosj closed this Oct 4, 2024
@jrfnl jrfnl deleted the trac-62061/ghactions-add-php-8.4 branch October 4, 2024 14:12
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.

2 participants