New Features(CLI, Configs):
- Add
tool/analyze_phpt
to analyze phpt files. See https://www.phpinternalsbook.com/tests/phpt_file_structure.html
New Features(Analysis):
- Support php 8.2's
true
type (https://wiki.php.net/rfc/true-type).
EmitPhanCompatTrueType
whentrue
is used whenminimum_target_php_version
is less than 8.2. - Emit
PhanCompatStandaloneType
instead ofPhanInvalidNode
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 whenminimum_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)