packagist phan/phan 2.4.2
Release 2.4.2 supporting PHP 7.0-7.4 syntax

latest releases: v5.x-dev, dev-fix-4782, dev-MapReal-php81-82...
4 years ago

New features(Analysis):

  • Emit PhanTypeInvalidCallExpressionAssignment when improperly assigning to a function/method's result (or a dimension of that result) (#3455)
  • Fix an edge case parsing (0)::class with the polyfill. (#3454)
  • Emit PhanTypeInvalidDimOffset for accessing any dimension on an empty string or an empty array. (#3385)
  • Warn about invalid string literal offsets such as 'str'[3], 'str'[-4], etc. (#3385)
  • Infer that arrays are non-empty and support array access from isset($x[$offset]) (#3463)
  • Make array_key_exists imply argument is a non-empty-array (or an object). (#3465, #3469)
  • Make isset($x[$offset]) imply argument is a non-empty-array, object, or string
    Make isset($x['literal string']) imply argument is a non-empty-array or object, and not a string.
  • Make isset($x->prop) imply $x is an object.
  • Make isset($this->prop[$x]) imply $this->prop is not the empty array shape. (#3467)
  • Improve worst-case time of deduplicating unique types in a union type (#3477, suggested in #3475)

Maintenance:

  • Update function signature maps for internal signatures.

Bug fixes:

  • Fix false positive PhanSuspiciousWeakTypeComparison for in_array/array_search/array_key_exists with function arguments defaulting to []

Don't miss a new phan release

NewReleases is sending notifications on new releases.