packagist phan/phan 5.4.0
Release 5.4.0 supporting PHP 7.0-8.1 syntax

latest releases: v5.x-dev, dev-fix-4782, dev-MapReal-php81-82...
19 months ago

New Features(CLI, Configs):

New Features(Analysis):

  • Support php 8.2's true type (https://wiki.php.net/rfc/true-type).
    Emit PhanCompatTrueType when true is used when minimum_target_php_version is less than 8.2.
  • Emit PhanCompatStandaloneType instead of PhanInvalidNode for uses of null/false as real standalone types to support php 8.2 https://wiki.php.net/rfc/null-false-standalone-types
    (Not emitted when minimum_target_php_version is 8.2 or higher)
  • Improve support for php 8.2 readonly classes and php 8.1 readonly properties

Bug fixes:

  • Fix php 8.2.0-dev deprecation notice for ast\Node when running Phan in php 5.2.0 with the polyfill instead of the native php-ast version.
  • Fix DuplicateArrayKeyPlugin "Implicit conversion from float ... to int" warning causing crash in php 8.1 (#4666)
  • Fix slow memory leak of reference cycles in the language server - enable garbage collection for the Phan daemon/language server consistently. (#4665)
    (This fix is only enabled in php 7.3+ when using pcntl, the pcntl fallback already re-enabled garbage collection. php 7.3 improved the garbage collection efficiency for large collections of objects.)
  • Move PhanGenericConstructorTypes warning to the class inheriting a constructor if needed (#4675)
  • Fix crash when combining types for null and an array with PHP_INT_MAX as a key (#4688)
  • Fix incorrect type inference for arrays with keys that were invalid UTF-8 (#4688)
  • Fix error due to deprecation notice running Phan in php 8.2 due to use of "${}" string interpolation (#4692)

Don't miss a new phan release

NewReleases is sending notifications on new releases.