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

Update psr/log to 3.0 #470

Closed
2 tasks done
Log1x opened this issue May 3, 2022 · 2 comments · May be fixed by #541
Closed
2 tasks done

Update psr/log to 3.0 #470

Log1x opened this issue May 3, 2022 · 2 comments · May be fixed by #541

Comments

@Log1x
Copy link

Log1x commented May 3, 2022

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

Latest

Cloudflare-WordPress version

Latest

PHP version

8.0

Expected result

I currently have a project that uses psr/log but upon updating to 3.0 I'm getting an error thrown from Cloudflare's implementation due to the ::debug declaration when extending AbstractLogger.

I'd like to request that psr/log be updated to 3.0 on the plugin to resolve the conflict if possible.

I'm open to doing a PR for this.

Actual result

2022/05/03 07:40:24 [error] 11363#11363: *29714057 FastCGI sent in stderr: "PHP message: 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 /home/example/webapps/example-staging/releases/20220503073807/web/app/plugins/cloudflare/src/Integration/DefaultLogger.php on line 42"

Steps to reproduce

  1. Require psr/log into your site/project (e.g. through composer).
  2. Get thrown the error above due to declaration incompatibility.

Additional factoids

No response

References

No response

@jacobbednarz
Copy link
Member

you're welcome to submit a PR to address this if you'd like it upgraded. just note our requirements for php 7.x and 8.x in your testing.

@Log1x
Copy link
Author

Log1x commented May 3, 2022

ahh wasn't thinking about psr/log's support of php 7.x. i guess that kills this issue then. ill figure out another way, thanks!

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

Successfully merging a pull request may close this issue.

2 participants