packagist vimeo/psalm 3.9.2
Fix a few incompatibilities introduced in 3.9.0

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

Psalm had an existing issue where it failed to detect the bug in the following code:

class A {
  public function __toString() { return (string) rand(0, 10); }
}

function foo(A $a) {
  if ($a === "1" || $a === "2") {} // this will never work
}

Fixing this unearthed a few potential bugs added in 3.9.0 – out of an abundance of caution I'm doing another point release.

Don't miss a new psalm release

NewReleases is sending notifications on new releases.