open-telemetry / opentelemetry-php

The OpenTelemetry PHP Library
https://opentelemetry.io/docs/instrumentation/php/
Apache License 2.0
686 stars 170 forks source link

Fix `weaken` for PHP8.4 closure names #1303

Closed Nevay closed 1 month ago

Nevay commented 1 month ago

PHP8.4 non-first-class-callables include source information in their name -> checking for {closure} fails.

Error: Call to undefined method OpenTelemetry\SDK\Logs\Processor\BatchLogRecordProcessor::{closure:OpenTelemetry\SDK\Logs\Processor\BatchLogRecordProcessor::__construct():100}()

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.00%. Comparing base (100e593) to head (6ceab44).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303/graphs/tree.svg?width=650&height=150&src=pr&token=OE661REHqm&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #1303 +/- ## ========================================= Coverage 74.00% 74.00% Complexity 2367 2367 ========================================= Files 347 347 Lines 7077 7077 ========================================= Hits 5237 5237 Misses 1840 1840 ``` | [Flag](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [8.1](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [8.2](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `?` | | | [8.3](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `74.00% <100.00%> (ø)` | | | [8.4](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | `74.00% <100.00%> (+1.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [src/SDK/Common/Util/functions.php](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303?src=pr&el=tree&filepath=src%2FSDK%2FCommon%2FUtil%2Ffunctions.php&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c3JjL1NESy9Db21tb24vVXRpbC9mdW5jdGlvbnMucGhw) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry). Last update [100e593...6ceab44](https://app.codecov.io/gh/open-telemetry/opentelemetry-php/pull/1303?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry).