v0.3.2
Bug Fixes
=&by-reference assignment —$a =& $bwas indistinguishable from$a = $bin the AST.AssignExprnow carriesby_ref: bool.&$varin array/list destructuring —[&$a]/list(&$a)silently dropped the&.ArrayElementnow carriesby_ref: bool.- Empty destructuring slots —
[$a, , $c]empty slots were emitted asExprKind::Null, colliding with literalnull. They now emit the newExprKind::Omitvariant. - String parsing dead code — a branch in double-quoted string parsing would produce an empty
InterpolatedString, losing the expression. Now preserved correctly.
AST Changes (php-ast)
AssignExpr: newby_ref: boolfield (serialized only whentrue).ArrayElement: newby_ref: boolfield (serialized only whentrue).ExprKind::Omit: new unit variant for skipped destructuring positions.
Testing
- 8 new regression tests covering each bug.
- Nikic fixture corpus: test both valid and invalid fixtures, fix duplicate names, version-gate PHP 8.4/8.5 fixtures.
- Expanded edge-case coverage across PHP 8.0–8.5.
Full changelog: https://github.com/jorgsowa/rust-php-parser/blob/main/CHANGELOG.md