Closed jrfnl closed 3 years ago
As the minimum version for the library is PHP 7.1, could you please add the return types instead?
@nikic No problem, what would you like me to use for the key()
and current()
methods though ? mixed
is only available as of PHP 8.0.
@jrfnl Oh right, totally forgot about that. Let's keep the #[ReturnTypeWillChange]
for those then and only add types to the other methods. There aren't any more specific types that could be used in this case.
@nikic Will do. It was the reason why I went with the attribute in the first place as it made the code consistent.
Rebased & updated. Should be good to go.
A run on PHP 8.1 currently shows:
These deprecation notices relate to the Return types for internal methods RFC in PHP 8.1.
Using the attribute will silence the deprecation notices for now for those methods for which it cannot be added yet (PHP 8.0
mixed
). For all other methods, the return type has now been added.