Releases: nikic/PHP-Parser
Releases · nikic/PHP-Parser
PHP-Parser 4.5.0
Added
- [PHP 8.0] Added support for the mixed type. This means
mixed
types are now parsed as anIdentifier
rather than aName
. - [PHP 8.0] Added support for catching without capturing the exception. This means that
Catch_::$var
may now be null.
PHP-Parser 4.4.0
Added
- Added support for passing union types in builders.
- Added end line, token position and file position information for comments.
- Added
getProperty()
method toClassLike
nodes. - [PHP 8.0] Add support for variable syntax tweaks RFC.
Fixed
- Fixed generation of invalid code when using the formatting preserving pretty printer, and inserting code next to certain nop statements. The formatting is still ugly though.
getDocComment()
no longer requires that the very last comment before a node be a doc comment. There may not be non-doc comments between the doc comment and the declaration.- Allowed arbitrary expressions in
isset()
andlist()
, rather than just variables. In particular, this allowsisset(($x))
, which is legal PHP code.
PHP-Parser 4.3.0
Added
- [PHP 8.0] Added support for union types using a new
UnionType
node.
PHP-Parser 4.2.5
Changed
- Tests and documentation are no longer included in source archives. They can still be accessed by cloning the repository.
- php-yacc is now used to generate the parser. This has no impact on users of the library.
PHP-Parser 4.2.4
PHP-Parser 4.2.3
PHP-Parser 4.2.2
Added
- [PHP 7.4] Add support for arrow functions using a new
Expr\ArrowFunction
node. (#602) - [PHP 7.4] Add support for array spreads, using a new
unpack
subnode onArrayItem
. (#609) - Added support for inserting into empty list nodes in the formatting preserving pretty printer.
Changed
php-parse
will now print messages to stderr, so that stdout only contains the actual result of the operation (such as a JSON dump). (#605)
Fixed
- Fixed attribute assignment for zero-length nop statements, and a related assertion failure in the formatting-preserving pretty printer. (#589)
PHP-Parser 4.2.1
Added
- [PHP 7.4] Add support for
??=
operator through a newAssignOp\Coalesce
node. (#575)
PHP-Parser 4.2.0
Added
- [PHP 7.4] Add support for typed properties through a new
type
subnode ofStmt\Property
. AdditionallyBuilder\Property
now has asetType()
method. (#567) - Add
kind
attribute toCast\Double_
, which allows to distinguish between(float)
,(double)
and(real)
. The form of the cast will be preserved by the pretty printer. (#565)
Fixed
- Remove assertion when pretty printing anonymous class with a name (#554).