sebastianbergmann/type

PHP 8.1: Return type deprecation notices in Iterator.php for 1.1

Closed this issue · 0 comments

In Version 1.1 which is still used in PHPUnit 8.5 are 3 deprecation notices:

  • sebastian/type/tests/_fixture/Iterator.php:
line 14: Deprecated: Return type of SebastianBergmann\Type\TestFixture\Iterator::current(): void should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
line 22: Deprecated: Return type of SebastianBergmann\Type\TestFixture\Iterator::key(): void should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
line 26: Deprecated: Return type of SebastianBergmann\Type\TestFixture\Iterator::valid(): void should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Reproduceable with:

$ composer require sebastian/type:^1
$ php vendor/sebastian/type/tests/_fixture/Iterator.php