-
Notifications
You must be signed in to change notification settings - Fork 21
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 phpunit for all tests and add testing for PHP 8.1 #1758
Comments
I did some testing, and phpunit can be updated without any issues. However running phpunit with PHP 8.1 still poses some problems. There are some warnings coming from the rmccue library:
It's a dependency of the package Even after an update we still receive the deprecated warnings:
Note that these are warnings so we can still complete testing, but it fails with some other errors which need to be looked at:
|
Another blocker to running unit tests for PHP 8.1 is the following deprecation warning in the google/apiclient package: googleapis/google-api-php-client#2372 (comment) |
User story
Previously we've stuck with phpunit 7.5.20 because we needed to remain compatible with older WordPress / WooCommerce tests. We use the
yoast/phpunit-polyfills
package to still be able to take advantage of newer functions introduced for unit testing.However for testing with PHP 8.0 we use a workaround and upgrade to phpunit 9.5, with the limitation that it was unable to test with a WP version older than 5.9. Now that WP 6.1 is released, if we support WP versions L-2 we can run unit testing for 5.9 - 6.1 without needing to check older versions. This means we can upgrade the phpunit for all tests and no longer need the workaround.
Doing so will also enable us to setup unit testing for PHP 8.1, which could help identify issues like the one reported in #1745
Technical
The text was updated successfully, but these errors were encountered: