phan v4.0.0-alpha1 Release Notes

Release Date: 2020-09-19 // over 3 years ago
  • ๐Ÿš€ The Phan v4 release line has the following changes from Phan 3:

    • โฌ†๏ธ Bump the minimum required AST version from 70 to 80 (Required to analyze php 8.0 attributes - the rest of the php 8.0 syntax changes are supported in both Phan 3 and Phan 4).
      ๐Ÿ”Œ A few third party plugins may be affected by the increase of the AST version.
    • ๐Ÿ‘Œ Supports analyzing whether #[...] attributes are used properly when run with PHP 8.0+

    ๐Ÿ†• New features (Analysis):

    ๐Ÿ‘Œ Support analyzing PHP 8.0 attributes when Phan is run with php 8.0 or newer.
    Warn if the attribute syntax is likely to be incompatible in php 7.
    Warn if using attributes incorrectly or with incorrect argument lists.

    ๐Ÿ†• New issue types: PhanCompatibleAttributeGroupOnSameLine, PhanCompatibleAttributeGroupOnMultipleLines,
    PhanAttributeNonAttribute, PhanAttributeNonClass, PhanAttributeNonRepeatable,
    PhanUndeclaredClassAttribute, PhanAttributeWrongTarget, PhanAccessNonPublicAttribute.

    Backwards incompatible changes:

    • Switch from AST version 70 to AST version 80.
      โฌ†๏ธ php-ast should be upgraded to version 1.0.10-dev or newer.
    • โฌ‡๏ธ Drop the no-op --polyfill-parse-all-doc-comments flag.

    Miscellaneous:

    • ๐Ÿ‘‰ Make various classes from Phan implement Stringable.