github vimeo/psalm 7.9.0

25 minutes ago

What's Changed

Features

Fixes

  • Fix explode() return type with a negative limit by @orklah in #13949
  • Report native return types disjoint from the inherited @return docblock by @orklah in #13951
  • Narrow strings by strlen() comparisons that imply non-emptiness one way by @orklah in #13953
  • Drop null from the left side of ?? on ArrayAccess offsets (#9960) by @jirkace in #12738
  • Don't assume an implicit null return after exhaustive type checks by @orklah in #13952
  • Cast numeric-string and float array keys to int by @orklah in #13956
  • Take an offset bound by reference as created, and its null array as an array by @orklah in #13954
  • Narrow loop counters with the exit condition and inc/dec conditions by @orklah in #13950
  • Do not make a key optional when the unsealed arrays lacking it may hold it by @orklah in #13904
  • Narrow the receiver of a nullsafe chain that is not identical to null by @jirkace in #12701
  • Fix superglobal made nullable by global by @orklah in #13973
  • Fix UndefinedVariable in isset() after a switch whose later case ends in a conditional throw by @orklah in #13974
  • Fix: RedundantCondition on a nullsafe fetch compared to a bool literal by @alies-dev in #13945
  • Fix crash destructuring an ArrayAccess object of self by @shu-chen-dot-ca in #13785
  • Fix: nullsafe fetch on an unread non-null property receiver is typed nullable by @alies-dev in #13946
  • Resolve static in template arguments when comparing inherited signatures by @orklah in #14000
  • Fix: PHP 8.6 SodiumCryptoXof*State classes are undefined by @alies-dev in #14013
  • Handle break 2 out of a nested switch by @orklah in #13991
  • Fix UnusedVariable for an assignment before a break or in a catch read after the enclosing if by @orklah in #13981
  • Narrow the value a loop exits with through ++/-- in its condition by @orklah in #13992
  • Fix UndefinedVariable for a variable assigned in a nested && operand by @orklah in #13976
  • Fix: properties of builtin classes known only through reflection are mixed by @alies-dev in #14015
  • Keep the memoized result of a call that may change it by @orklah in #13990
  • Fix: curl_multi_get_handles() returns array<array-key, mixed> instead of list<CurlHandle> by @alies-dev in #14022
  • Fix: PHP 8.6 global constants are undefined when Psalm runs on PHP < 8.6 by @alies-dev in #14024
  • Fix: a parent's @method overriding a non-public method of the child where the call reaches it by @orklah in #14016
  • Replace characters XML 1.0 forbids in checkstyle and JUnit reports by @orklah in #14025
  • Fix: PHP 8.6 signatures of socket_addrinfo_lookup(), socket_cmsg_space() and ldap_free_result() by @alies-dev in #14023
  • Inherit Iterator methods on interfaces extending RecursiveIterator and other internal interfaces by @orklah in #14026
  • Take superglobals passed by reference as set by @orklah in #14035
  • array_key_exists() removes null and false from the array where it is true by @orklah in #13975
  • Don't accept an object with __toString() for a string in overridden method types by @orklah in #14029

Internal changes

  • Re-enable skipped tests that pass, link the others to their issues by @orklah in #13935
  • Fix ComplexMethod on SwitchCaseAnalyzer::analyze() in self-analysis by @orklah in #13996

Full Changelog: 7.8.0...7.9.0

Don't miss a new psalm release

NewReleases is sending notifications on new releases.