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 deprecated notice #230

Open
igumnovaleksey opened this issue Apr 7, 2023 · 1 comment
Open

PHP 8.1 deprecated notice #230

igumnovaleksey opened this issue Apr 7, 2023 · 1 comment

Comments

@igumnovaleksey
Copy link

The following deprecated notices were found while using the phpstan tool:

all/libraries/composer/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php
180 line Return type mixed of method Masterminds\HTML5\Parser\StringInputStream::current() is not covariant with tentative return type mixed of method Iterator::current().
189 line Return type mixed of method Masterminds\HTML5\Parser\StringInputStream::next() is not covariant with tentative return type void of method Iterator::next()
197 line Return type mixed of method Masterminds\HTML5\Parser\StringInputStream::rewind() is not covariant with tentative return type void of method Iterator::rewind()
207 line Return type mixed of method Masterminds\HTML5\Parser\StringInputStream::valid() is not covariant with tentative return type bool of method Iterator::valid()
327 line Return type mixed of method Masterminds\HTML5\Parser\StringInputStream::key() is not covariant with tentative return type mixed of method Iterator::key()

@PavelSPN
Copy link

PavelSPN commented Aug 3, 2023

Hi igumnovaleksey!

To be more compatible with previous versions of PHP (for example the type "mixed" available as of PHP 8.0.0) it would be better to use

#[\ReturnTypeWillChange]

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