html5-php icon indicating copy to clipboard operation
html5-php copied to clipboard

PHP 8.1 deprecated notice

Open igumnovaleksey opened this issue 2 years ago • 1 comments

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()

igumnovaleksey avatar Apr 07 '23 13:04 igumnovaleksey

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]

PavelSPN avatar Aug 03 '23 09:08 PavelSPN