-
Notifications
You must be signed in to change notification settings - Fork 65
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 for PHP 8 Compatibility #121
Comments
It looks like this is going to require optionally using a different version of PHPUnit. I haven't got it to work successfully yet, but the code in question is here. It's currently downloading/installing PHPUnit's PHP support page: https://phpunit.de/supported-versions.html PHPUnit 9 does (or will?) support PHP 8: sebastianbergmann/phpunit#4325 This might help: https://core.trac.wordpress.org/ticket/51456#comment:5 Edit: More Details |
A quick note that |
inside functions.php
update the line on prepare
about the PHP_VERSION, we should try the get_env_details() |
I've been sick and not able to get to this, but wanted to be sure to pass on this info, since it should help: I asked if it's possible to use Composer to install based on a different version of PHP that is not the current one on the system. From @jrfnl: https://wordpress.slack.com/archives/C02RQBWTW/p1605101934303000?thread_ts=1605072913.278300&cid=C02RQBWTW
@jrfnl also noted this, which I think is the best option:
This would require composer on the prepare side (I don't believe it is currently required), but that should be fine as long as test reporters are notified ahead of time. Putting it all together, we can:
In
|
Additional note based on the above discussion: The WP Core test suite is NOT compatible with PHPUnit 8/9 and will actively block itself from being run with any PHPUnit version > 7.5. A hack has been used to get round the PHPUnit 7 incompatibility with PHP 8 (WP local copy of some of the PHPUnit 9 files which overload the same files from PHPUnit 7), so the test suite will run on PHP 8 using PHPUnit 7.5.20, but ONLY if installed via Composer. |
I chatted with @jrfnl (thank you!!) and together decided these steps would be best to make this compatible with PHP 5.6->8.X:
(@jrfnl If I missed anything, or any of this is off, please do feel free to correct me!) |
Fixed by: #132 Here are the currently running and not-currently-reporting hosts, so that we can pay attention if anything breaks:
|
We should test the test runner for PHP 8 compatibility so that it's ready when core is compatible.
The text was updated successfully, but these errors were encountered: