phan v2.7.0 Release Notes

Release Date: 2020-04-01 // about 4 years ago
  • ๐Ÿ†• New features(CLI, Configs):

    • Sort output of --dump-ctags=basic by element type before sorting by file name (#3811)
      (e.g. make class and global function declarations the first tag type for a tag name)
    • 0๏ธโƒฃ Colorize the output of phan_client by default for the default and text output modes. (#3808)
      โž• Add phan --no-color option to disable colors.
    • Warn about invalid CLI flags in phan_client (#3776)
    • ๐Ÿ‘Œ Support representing more AST node types in issue messages. (#3783)
    • ๐Ÿ‘‰ Make some issue messages easier to read (#3745, #3636)
    • ๐Ÿ‘ Allow using --minimum-severity=critical instead of --minimum-severity=10 (#3715)
    • 0๏ธโƒฃ Use better placeholders for parameter default types than null in issue messages and hover text (#3736)
    • ๐Ÿš€ Release phantasm, a prototype tool for assembling information about a codebase and aggressively optimizing it.
      Currently, the only feature is replacing class constants with their values, when safe to do so.
      โšก๏ธ More features (e.g. inlining methods, aggressively optimizing out getters/setters, etc.) are planned for the future.
      ๐Ÿ‘€ See tool/phantasm --help for usage.

    ๐Ÿ†• New features(Analysis):

    • ๐Ÿ‘Œ Improve analysis of php 7.4 typed properties.
      ๐Ÿ‘Œ Support extracting their real union types from Reflection information.
      0๏ธโƒฃ Infer the existence of properties that are not in ReflectionClass->getPropertyDefaults()
      0๏ธโƒฃ due to being uninitialized by default.
    • Emit PhanAbstractStaticMethodCall* when calling an abstract static method statically. (#3799)
    • Emit PhanUndeclaredClassReference instead of PhanUndeclaredClassConstant for MissingClass::class.

    Language Server/Daemon mode:

    • ๐Ÿ‘€ Catch exception seen when printing debug info about not being able to parse a file.
    • Warn when Phan's language server dependencies were installed for php 7.2+
      but the language server gets run in php 7.1. (phpdocumentor/reflection-docblock 5.0 requires php 7.2)
    • Immediately return cached hover text when the client repeats an identical hover request. (#3252)

    Miscellaneous:

    • ๐Ÿ›  PHP 8.0-dev compatibility fixes, analysis for some new functions of PHP 8.0-dev.
    • โž• Add symfony/polyfill-php72 dependency so that symfony 5 will work better in php 7.1.
      ๐Ÿš€ The next Phan major release will drop support for php 7.1.