The Phan 3.x release line uses php-ast
's AST version 70 and supports the analysis of all PHP 8.0 syntax except attributes (when run with PHP 8).
The planned 4.x release line will use AST version 80 and require php-ast
1.0.10+ in order to parse/analyze PHP 8.0's #[]
attributes
New features (Analysis):
- Update many more real parameter names to match php 8.0's parameter names for php's own internal methods. (#4263)
- Infer that an instance property exists for PHP 8.0 constructor property promotion. (#3938)
- Infer types of properties from arguments passed into constructor for PHP 8.0 constructor property promotion. (#3938)
- Emit
PhanInvalidNode
andPhanRedefineProperty
when misusing syntax for constructor property promotion. (#3938) - Emit
PhanCompatibleConstructorPropertyPromotion
when the project'sminimum_target_php_version
is older than8.0
(#3938) - Emit
PhanSuspiciousMagicConstant
when using__FUNCTION__
inside of a closure. (#4222)