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

Support PHP 8.3 and PHP 8.4, WordPress 6.7.1 and PHPUnit 10 & 11 #116

Open
bobbingwide opened this issue Dec 7, 2023 · 4 comments
Open
Assignees

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Dec 7, 2023

Update code and tests to support PHP 8.3
See https://github.com/bobbingwide/bobbingwide

Specifically, cater for PHP 8.3 EOL date, which is 23rd November 2023 - for end of security support.

Warning: Undefined array key "8.3" in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\admin\class-oik-trace-info.php on line 233

@bobbingwide bobbingwide self-assigned this Dec 7, 2023
bobbingwide added a commit that referenced this issue Dec 9, 2023
@bobbingwide bobbingwide changed the title Support PHP 8.3 Support PHP 8.3 and PHP 8.4 Sep 14, 2024
@bobbingwide
Copy link
Owner Author

bobbingwide commented Sep 14, 2024

PHP 8.4 will be released in November and already has a published EOL date in 2028.

@bobbingwide
Copy link
Owner Author

I got the following message when defining Trace files for the first time in s.b/officialcaravan

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\admin\class-oik-trace-summary.php on line 96

@bobbingwide
Copy link
Owner Author

With PHP 8.4 installed I got the following message

[23-Nov-2024 15:42:30 UTC] PHP Deprecated: Constant E_STRICT is deprecated in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php on line 256

@bobbingwide bobbingwide changed the title Support PHP 8.3 and PHP 8.4 Support PHP 8.3 and PHP 8.4, WordPress 6.7.1 and PHPUnit 10 & 11 Dec 6, 2024
@bobbingwide
Copy link
Owner Author

bobbingwide commented Dec 6, 2024

Now that PHP 8.4 has been released we need to test with that version
Which means changing the PHPUnit tests to be compatible with PHPUnit 10 and 11
And testing with WordPress 6.7.1

See bobbingwide/bobbingwide#141

Having followed the process documented here bobbingwide/bobbingwide#141 (comment)
the PHPUnit tests failed for PHPUnit 9.
This was due to the fact that the tests depended on the tests in test--oik-bwtrace.php to be run first.
After the file was renamed to match the class name Tests_oik_bwtrace
these tests were no longer run first.
The pragmatic solution was to rename the class to Tests__oik_bwtrace and rename the file as well.
The test sequence in the same order as before, allowing the tests to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant