psalm icon indicating copy to clipboard operation
psalm copied to clipboard

PHP 8.1 deprecated calls not reported

Open kkmuffme opened this issue 3 years ago • 1 comments

https://psalm.dev/r/24131c8655

key, current, next, prev, reset on objects is deprecated as of 8.1

Similar issues:

  • mb_check_encoding without arguments
  • get_class, get_parent_class and get_called_class without arguments
  • IntlCalendar::roll() with bool passed as $value
  • ctype_ functions called with non-string argument

kkmuffme avatar Feb 01 '22 12:02 kkmuffme

I found these snippets:

https://psalm.dev/r/24131c8655
<?php

$foo = (object) null;

$bar = current( $foo );
Psalm output (using commit 2e01e9b):

INFO: MixedAssignment - 5:1 - Unable to determine the type that $bar is being assigned to

INFO: UnusedVariable - 5:1 - $bar is never referenced or the value is not used

psalm-github-bot[bot] avatar Feb 01 '22 12:02 psalm-github-bot[bot]