open-telemetry / opentelemetry-php

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

Add return types for ArrayAccess in docblocks in AttributesBuilder #1319

Closed MetalArend closed 3 weeks ago

MetalArend commented 3 weeks ago

Using the open-telemetry SDK package in a Symfony project gives us a lot of deprecation messages based on the ArrayAccess methods going to change in the future. This PR tries to solve it in the softest way possible.

I saw that in other places the actual return types were added, but as this code has also #[\ReturnTypeWillChange], I think this code can not be upgraded in the same way yet, right?