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.1 throws warning with package #118

Closed
waleedfaridworkland opened this issue Mar 31, 2022 · 3 comments
Closed

PHP 8.1 throws warning with package #118

waleedfaridworkland opened this issue Mar 31, 2022 · 3 comments

Comments

@waleedfaridworkland
Copy link

Running this package on PHP 8.1, returns a php notice

Deprecated: Return type of Jaeger\SpanContext::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/SpanContext.php on line 48

@sergeyklay
Copy link
Collaborator

@waleedfaridworkland Could you please send a patch?

@waleedfaridworkland
Copy link
Author

@sergeyklay The thing is, despite changing

Jaeger\SpanContext::getIterator()
to
Jaeger\SpanContext::getIterator(): Traversable

Or even adding the #[\ReturnTypeWillChange] attribute, makes no difference.

I am not entirely sure why.

sergeyklay added a commit that referenced this issue Apr 11, 2022
Resolve #118, added php 8.1 support for library
@sergeyklay
Copy link
Collaborator

Just released v1.4.1 with a fix. Thank you @dkemper for quick fix!

/cc @conserj

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

2 participants