Cloudflare-WordPress
Cloudflare-WordPress copied to clipboard
PHP 8.2 Compatibility
Confirmation
- [X] My issue isn't already found on the issue tracker.
- [X] I have replicated my issue using the latest version of the plugin and it is still present.
WordPress version
6.4.2
Cloudflare-WordPress version
4.12.2
PHP version
8.2.8
Expected result
Successful plugin activation
Actual result
$ wp plugin activate cloudflare PHP Fatal error: Declaration of CF\Integration\DefaultLogger::debug($message, array $context = []) must be compatible with Psr\Log\AbstractLogger::debug(Stringable|string $message, array $context = []): void in /x/wp-content/plugins/cloudflare/src/Integration/DefaultLogger.php on line 42 Fatal error: Declaration of CF\Integration\DefaultLogger::debug($message, array $context = []) must be compatible with Psr\Log\AbstractLogger::debug(Stringable|string $message, array $context = []): void in /x/wp-content/plugins/cloudflare/src/Integration/DefaultLogger.php on line 42
Steps to reproduce
Trying to use plugin with php 8.2.8.
Additional factoids
No response
References
No response
It's a collision with rollbar plugin.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello ! Any news about when this will be fixed ? I'm actualy running into the same issue and can't enable the plugin.
edit : I don't have the "rollbar plugin" on my side.
Hello ! Any news about when this will be fixed ? I'm actualy running into the same issue and can't enable the plugin.
edit : I don't have the "rollbar plugin" on my side.
So we fixed this by forcing certain composer dependencies namely psr/log to use different versions that are compatible with the cloudflare plugin's requirements.
IF you are using composer for your project try:
"psr/log": "^1.0.0",
If that doesn't fix it then you'll need to keep digging: composer why {insert a desperate guess dependency name} -t
There is already a PR that would fix this, not sure why they haven't done it yet. https://github.com/cloudflare/Cloudflare-WordPress/pull/541