Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1.5 Throwing Deprecated Error on Iterator Class #4

Open
jshster opened this issue May 10, 2022 · 1 comment
Open

PHP 8.1.5 Throwing Deprecated Error on Iterator Class #4

jshster opened this issue May 10, 2022 · 1 comment

Comments

@jshster
Copy link

jshster commented May 10, 2022

Any plans to develop this and bring it up to speed with PHP 8.1.5?

I'm running your sample code and getting the following error:
Deprecated: Return type of TournamentGenerator\Containers\BaseContainer::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in .\sandbox\bracket-may-2022\vendor\heroyt\tournament-generator\src\TournamentGenerator\Containers\BaseContainer.php on line 122

@Heroyt
Copy link
Owner

Heroyt commented May 11, 2022

Hi, I'm planning on bringing the library to PHP 8.1, but currently, I'm preoccupied with other work.

The warning you're getting is only due to missing return type hint but should not affect functionality itself. You can add a '@' sign before the function call which will mute the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants