Page MenuHomePhorge

Misc "Return type is not covariant" errors for method Iterator::key()
Open, Needs TriagePublic

Description

PHP 8.1 requires implementations of Iterator::key() to declare a return type. When not doing so, the notice is printed.
A simple workaround might be using the #[\ReturnTypeWillChange] attribute to suppress the error message; cf rARC3626582354e4fc62191927a80b274ec71284cb77.

Output from PHPStan: