phan v2.4.6 Release Notes

Release Date: 2019-12-29 // about 4 years ago
  • ๐Ÿ†• New features(CLI, Configs):

    • โž• Add more detailed instructions for installing dependencies new php installations on Windows without a php.ini
    • ๐Ÿ– Handle being installed in a non-standard composer directory name (i.e. not vendor) (mentioned in #1612)

    ๐Ÿ†• New Features(Analysis):

    • ๐Ÿ‘Œ Improve inferred array shapes for multi-dimensional assignments or conditions on arrays
      (e.g. $x['first']['second'] = expr or if (cond($x['first']['second']))) (#1510, #3569)
    • Infer that array offsets are no longer possibly undefined after conditions such as if (!is_null($x['offset']))
    • ๐Ÿ‘Œ Improve worst-case runtime when merging union types with many types (#3587)
    • ๐Ÿ‘Œ Improve analysis of assignment operators. (#3597)
    • Infer $x op= expr and ++/-- operators have a literal value when possible, outside of loops. (#3250, #3248)
    • ๐Ÿšš Move PhanUndeclaredInterface and PhanUndeclaredTrait warnings to the line number of the use/implements. (#2159)
    • Don't emit PhanUndeclaredGlobalVariable for the left side of ??/??= in the global scope (#3601)
    • More consistently infer that variables are possibly undefined if they are not defined in all branches. (#1345, #1942)
    • โž• Add new issue types for possibly undeclared variables: PhanPossiblyUndeclaredVariable and PhanPossiblyUndeclaredGlobalVariable.

    ๐Ÿ”Œ Plugins:

    • โž• Add StrictLiteralComparisonPlugin to warn about loose equality comparisons of constant string/int to other values. (#2310)

    ๐Ÿ› Bug fixes:

    • ๐Ÿ›  Fix false positive PhanTypePossiblyInvalidDimOffset seen after
      other array fields get added to an array shape by assignment or condition (#3579, #3569)
    • ๐Ÿ“œ Properly extract the value of binary integer literals and binary/hex/octal float literals in the polyfill/fallback parser. (#3586)