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

PHP 8.2 Compatibility #528

Open
2 tasks done
fliespl opened this issue Dec 12, 2023 · 4 comments
Open
2 tasks done

PHP 8.2 Compatibility #528

fliespl opened this issue Dec 12, 2023 · 4 comments

Comments

@fliespl
Copy link

fliespl commented Dec 12, 2023

Confirmation

  • My issue isn't already found on the issue tracker.
  • 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

@fliespl
Copy link
Author

fliespl commented Dec 12, 2023

It's a collision with rollbar plugin.

Copy link

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.

@github-actions github-actions bot added the Stale label Jun 10, 2024
@xanghyr
Copy link

xanghyr commented Jun 10, 2024

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.

@github-actions github-actions bot removed the Stale label Jun 11, 2024
@tomkyser
Copy link

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. #541

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

No branches or pull requests

3 participants