v0.8.0
What's Changed
Breaking
StaticMethodCall/StaticMethodCallExprnow covers only static dispatch (Foo::bar()). Dynamic dispatch (Class::$method()) is a newStaticDynMethodCall/StaticDynMethodCallExprvariant. Match arms that previously handled dynamic dispatch viaStaticMethodCallmust be updated (php-ast, #225).
Added
visit_name()hook andwalk_name()free function in theVisitortrait — fully backwards compatible; all existing visitors compile unchanged (php-ast, #226).ParserContextstruct withreparse()/reparse_versioned()methods for arena reuse across re-parses. Resets the bump arena in O(1) before each parse, reducing allocator churn in LSP servers that re-parse on every keystroke (php-rs-parser, #221).
Fixed
- Visitor now traverses
TraitUseadaptations (php-ast, #223). - Risky
unwrap()in trait alias parsing replaced with proper error handling (php-rs-parser, #219). - Empty index in string interpolation (
$$arr[]) now emits a parse error instead of silently producing a malformed AST (php-rs-parser, #218). - Malformed Unicode escape sequences now emit parse errors (
php-rs-parser, #217). - Invalid assignment targets (e.g.
1 = $x) now emit parse errors (php-rs-parser, #216). - Non-associative chain detection restricted to same-precedence operators; mixed-precedence chains no longer trigger a false error (
php-rs-parser, #215). - Property hook parameter counts validated; mismatched arity now emits a parse error (
php-rs-parser, #214). - Invalid heredoc/nowdoc body indentation now emits a parse error (
php-rs-parser, #212).
Full Changelog: v0.7.0...v0.8.0