packagist vimeo/psalm 4.10.0
Better infinite loop inference, some PHP 8.1 support and a bunch of fixes

latest releases: 5.x-dev, dev-master, dev-isTypeContainedByType_flags...
2 years ago

Added

Fixes

  • (#6305, #6310) SimpleXMLIterator signatures no longer depend on runtime PHP version (@weirdan)
  • (#6309, #6311) Some assertions generated by in_array() were causing crashes (@weirdan)
  • (#6312) PhpToken::getAll() was renamed to PhpToken::tokenize() (@TysonAndre)
  • (#6312) fdiv() argument names were corrected to match names used by PHP (@TysonAndre)
  • (#6312) ReflectionClass::getAttributes(), ReflectionClassConstant::getAttributes(), ReflectionFunctionAbstract::getAttributes(), ReflectionParameter::getAttributes(), ReflectionProperty::getAtributes(), ReflectionUnionType::getTypes() and ReflectionNamedType::isBuiltin() signatures were missing (@TysonAndre)
  • (#6318, #6320) socket_select()'s tv_sec parameter is nullable (@Forceu)
  • (#6323) Another case of crashes due to in_array() assertions (@boesing)
  • (#6324) str_split() and mb_str_split() return require positive-int and str_split() returns non-empty array (@VincentLanglet)
  • (#6328) Corrected message for calls from root namespace to internal methods in a different namespace (@bdsl)
  • (#6325, #6327) Interface aliases were not recognized (@boesing)
  • (#4738) is_subclass_of() requires a class-string for its parent parameter (@BenMorel)
  • (#5356, #6344) UnusedSuppression was sometimes reported in ignored folders (@orklah)
  • (#6343, #6346) @psalm-trace was reporting keys that were unset (@orklah)
  • (#5096, #6321) Constants accessed through object instance (e.g. $obj::CONST) were not inferred (@orklah)
  • (#6359) OuterIterator::getInnerIterator() always return Iterator (@drupol)
  • (#6367, #6376) Variables used in backticks (`ls $file`) were reported as unused (@orklah)
  • (#6358, #6375) openssl_x509_parse() and openssl_x509_read() signatures were outdated (@ThomasLandauer)
  • (#6338, #6339) array_walk() and array_walk_recursive() accept object (and will trigger RawObjectIteration when given one) (@niconoe-, @weirdan)
  • (#6330, #6335) Alias chains created with class_alias() (A -> B -> C) were not understood (@boesing)
  • (#6387, #6390) Type params can now be extracted from Generator argument passed to Iterator parameter (@orklah)
  • (#6388, #6391) empty() could not be forbidden via forbiddenFunctions (@ro0NL)
  • (#6333, #6317) in_array() did not produce correct assertions with non-literal types (@TysonAndre)
  • (#6384, #6420) Variables reassigned in both branches of ternary operator were not correctly inferred (@orklah)

Docs

Don't miss a new psalm release

NewReleases is sending notifications on new releases.