0.3.0
New Features
PHP Version System
- New
PhpVersionenum covering PHP 8.0–8.5 - New
parse_versioned(arena, source, version)API that emits non-fatalParseError::VersionTooLowerrors for syntax requiring a higher version than targeted - Parsing always succeeds and produces a full AST regardless of version errors
- 16 version gates across PHP 8.0–8.4 syntax features:
- 8.0:
match, throw expressions, nullsafe?->, named arguments, constructor promotion - 8.1: enums,
readonlyproperties/parameters, intersection types - 8.2:
readonlyclass - 8.3: typed class constants and enum constants
- 8.4:
abstract readonlyclass, property hooks, asymmetric visibility, final promoted properties
- 8.0:
PHP 8.5 Support
- PHP 8.5 is now the default version target
- Pipe operator (
|>) gated behind PHP 8.5 clone($obj, [...])with property overrides — newExprKind::CloneWithAST node- Asymmetric visibility on static properties gated behind PHP 8.5
Bug Fixes
abstract readonly classno longer emits a spurious "cannot use 'abstract' and 'readonly' together" error (valid since PHP 8.4)- Typed class/enum constants now parse correctly inside class and enum bodies
- Constructor-promoted properties with
::constant defaults no longer trigger cascading errors
Other Changes
build: benchmark crates and test binaries excluded from published packagesdocs: organized documentation into structured directoriestest: 31 tests for malformed PHP error recovery paths, 73 tests for stmt.rs coverage, integration tests for allclone()argument forms