Skip to content

1.8.3

Compare
Choose a tag to compare
@phpstan-bot phpstan-bot released this 01 Sep 15:28
· 188 commits to 1.8.x since this release
5583623

This release fixes 76 issues! :tada:

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

  • Imagick::queryFontMetrics more specific return type (#1530), thanks @MartkCz!
  • Imagick::roundCornersImage correct naming and optional params (#1531), thanks @MartkCz!
  • str_split returns an empty array since PHP 8.2 (#1544), thanks @herndlm!
  • XmlReader::next|read() has side-effects (#1551), #5920, thanks @staabm!
  • Reflection: getName() returns a non-empty-string (#1599), #7056, thanks @staabm!
  • More precise ord() signature (#1620), thanks @thg2k!
  • More specific type for port component of 'parse_url() (#1622), thanks @thg2k!
  • Allow null as second parameter for json_decode (#1672), thanks @webmaster777!
  • Encoding functions returns non-empty-string (#1664), thanks @staabm!

Internals 🔍

  • HasOffsetType - create only for ConstantIntegerType|ConstantStringType (phpstan/phpstan-src@0a2fc63)
  • Simplify non-empty-array removal in array_push/array_unshift (#1552), thanks @herndlm!
  • Fix VirtualNode::getType() returning an incorrect value for ClassConstantsNode and MethodReturnStatementsNode (#1568), thanks @Muqsit!
  • Add return type stub for SimpleXMLElement::asXML (#1606), thanks @herndlm!
  • Simplify TypeSpecifier (#1613), thanks @staabm!
  • Avoid unnecessary intersection in MutatingScope::filterBySpecifiedTypes (#1536), thanks @herndlm!
  • Make IntegerRangeType constructor private (#1624), #7803, thanks @herndlm!
  • Remove jean85/pretty-package-versions dependency (#1607), thanks @herndlm!
  • Require brianium/paratest ^6.5 to fix PHP 8.2 deprecation notices (#1631), thanks @herndlm!
  • Replace pickArrays method in array_search extension with getAnyArrays helper (#1632), thanks @herndlm!
  • Intersect HasOffsetValue type only with possible arrays (#1634), thanks @herndlm!
  • Avoid benevolent union behaviour for more type methods (#1644), thanks @herndlm!
  • Use isArray instead of array supertype checks (#1634), thanks @herndlm!
  • Use isString instead of string supertype checks (#1634), thanks @herndlm!
  • Make MutatingScope::invalidateMethodsOnExpression() private (phpstan/phpstan-src@f3fe245)
  • Deprecate TypeUtils::containsCallable() (#1667), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_pop and array_shift extensions (#1668), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_fill_keys extension (#1676), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_reduce extension (#1677), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array pointer functions extension (#1678), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_map extension (#1680), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in RegularExpressionPatternRule (#1679), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_key_first and array_key_last extensions (#1681), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_intersect_key extension (#1682), thanks @herndlm!
  • Use TypeUtils::getOldConstantArrays in array_column extension (#1683), thanks @herndlm!