-
Notifications
You must be signed in to change notification settings - Fork 186
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
[Attribute-based hooking] SpanAttribute example does not align with the declared attribute target #1429
Comments
Looks to be the same as this report, in that we are using constructor property promotion and thus facing this complaint. |
Ah sorry, I only searched through open issues, as I was sure this was a bug. Does this mean it is a bug of phpstan and phpstorm to report this as an error? |
@LauJosefsen I think we could leave this open and test adding the additional target parameter to see if we can make phpstan happy 👍 |
I almost created another ticket with a Psalm error. I agree, it would be great if the attribute could also target function parameters as that is what the docs recommend the attribute be used for. 🙏 I really appreciate all of the hard work going into the PHP OTEL libraries! |
…ion\SpanAttribute Fixes open-telemetry#1429.
Hi.
PHPStan will report the error
If used as the examples in the readme. It is working, ignoring the stan error, so I think it just needs to be added to the attribute target? I am however not sure if it will break the anything in the extension code to do so.
This occurs with
open-telemetry/api^1.1.1
, which is as of writing the latest version.The text was updated successfully, but these errors were encountered: