Closed viteksafronov closed 2 years ago
PHP 8.1 deprecates an ability to override internal methods with incompatible return types https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.core.type-compatibility-internal
Method OpenTracing\NoopSpanContext::getIterator() implements one from IteratorAggregate, which has a \Traversable as a return type, and so it will produce Deprecated notice.
OpenTracing\NoopSpanContext::getIterator()
\Traversable
Add \Traversable as a return type
Background
PHP 8.1 deprecates an ability to override internal methods with incompatible return types https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.core.type-compatibility-internal
Problem
Method
OpenTracing\NoopSpanContext::getIterator()
implements one from IteratorAggregate, which has a\Traversable
as a return type, and so it will produce Deprecated notice.Proposal
Add
\Traversable
as a return type