ast: Changelog

Version Message
1.0.10 - Support attributes syntax change (`#[...]`) in php 8.0.0RC1.
- Change the current AST version from 70 to 80. AST version 80 is no longer experimental.
- Add `ReflectionParameter` defaults for `ast\parse_code` and `ast\get_supported_versions` in php 8.
- Add parameter types and return types to reflection for various global functions.
php-ast was already throwing a `TypeError` when invalid parameter types were received.
- Always throw instead of warning when invalid parameters are passed to the ast\Node constructor.
1.0.9 - Support API change in php 8.0.0beta3.
1.0.8 - Recommend using the new constant `ast\flags\PARAM_MODIFIER_*` when checking if parameters use constructor property promotion.
The values of `ast\flags\MODIFIER_*` and `ast\flags\PARAM_VARIADIC` had some overlap in some php 7 versions.
The new constants will have the same values as `ast\flags\MODIFIER_*` in PHP 8.0+, but different values in PHP 7
(and these flags will never be set in php 7).
- Support PHP 8.0's named arguments.
- Support PHP 8.0's nullsafe operator (`?->`).
1.0.7 - Add the experimental AST version 80
- In AST version 80, support returning `mixed` types as an `AST_TYPE` with type `TYPE_MIXED` instead of an `AST_NAME`.
- In AST version 80, support PHP 8.0 attributes for declarations.
- Support PHP 8.0's Match expressions.
- Support PHP 8.0 constructor property promotion, and allow indicating visibility on AST nodes.
Note that `MODIFIER_PUBLIC` and `ast\AST_PARAM` modifiers had overlap in php 7.4,
so the `MODIFIER_*` modifiers are only included in the provided metadata for php 8.0+
1.0.6 - Support TYPE_STATIC for the php 8.0 static return type.
1.0.5 - Add ast\flags\TYPE_FALSE to support PHP 8.0 Union Types.
1.0.4 - Add AST_TYPE_UNION to support PHP 8.0 Union Types.
1.0.3 - Fix build error in php 7.4.0alpha3.
- Add `DIM_ALTERNATIVE_SYNTAX` as a flag of `AST_DIM` for `$x{'offset'}` (for php 7.4+)
- Add `PARENTHESIZED_CONDITIONAL` as a flag of `AST_CONDITIONAL` for `($a ? $b : $c)` (for php 7.4+)
- Bugfix: Make `ast\kind_uses_flags(ast\AST_ARROW_FUNC)` true in php 7.3 and lower.
1.0.2 - Fix compatibility with (currently) PHP 7.4 and PHP 8.0.
- Support AST_ARROW_FUNC for PHP 7.4.
- Make $version a required parameter for `ast\parse_*`. Previously, the absence would throw a LogicException.
- Make AST version 70 the current version.
1.0.1 - Fix compatibility with (currenty) PHP 7.4 and PHP 8.0.
- Support BINARY_COALESCE as a flag of AST_ASSIGN_OP for the `??=` operator added in PHP 7.4.
- Add AST version 70 (experimental):
- Version 70 adds AST_PROP_GROUP with type information for property groups.
- Version 70 adds AST_CLASS_NAME for `Foo::class`. Previously this used AST_CLASS_CONST
1.0.0 This release is the same as version 0.1.7 with obsolete and deprecated functionality removed.

- Removed AST versions prior to version 50.
- Removed ast\Node\Decl class, which is no longer used.
AST_UNARY_MINUS, and AST_UNARY_PLUS, which are no longer used.
- Removed ASSIGN_* AST flags, which are no longer used.
0.1.7 - Added AST version 60 with the following changes:
- `AST_FUNC_DECL` and `AST_METHOD` no longer generate a `uses` child. Previously this child was
always `null`.
- `AST_FUNC_CONST_ELEM` now always has a `docComment` child. Previously it was absent on PHP 7.0.
On PHP 7.0 the value is always `null`.
- Added `ARRAY_ELEM_REF` flag, which is used by `AST_ARRAY_ELEM` for by-reference array elements
and (since PHP 7.3) for by-reference destructuring. Previously this flag was represented simply
by the value `1`.
- Deprecated AST versions 40 and 45.
- Fix build against PHP 7.4-dev.
0.1.6 - Added ast\get_metadata() function, which returns an array of ast\Metadata objects, one for each
AST kind. The metadata contains information such as the supported flags for the kind.
- Added ast\get_supported_versions() function, which provides an array of currently supported AST
0.1.5 - Fix issue #51: Make nullable array/callable have a flag of 0 in inner element, in version 40.
- Added a constructor for the ast\Node class.
- Added ast\flags\FUNC_GENERATOR constant, which is used since PHP 7.1.
- Added ast\flags\FUNC_RETURNS_REF constant, intended to supersede ast\flags\RETURNS_REF.
- Added ast\flags\CLOSURE_USE_REF constant, used by AST_CLOSURE_VAR nodes. Previously "1" was used.
- Added version 45 with the following changes (PHP 7.2 support):
- An `object` type annotation now returns an `AST_TYPE` with `TYPE_OBJECT` flag, rather than
treating `object` as a class name.
- Added version 50 with the following changes:
- `ast\Node\Decl` nodes are no longer generated. AST kinds `AST_FUNCTION`, `AST_METHOD`,
`AST_CLOSURE` and `AST_CLASS` now also use the normal `ast\Node` class. The `name` and
`docComment` properties are now represented as children. The `endLineno` is still represented as
an (undeclared) property.
- An integer `__declId` has been added to declaration nodes of kind `AST_FUNCTION`, `AST_METHOD`,
`AST_CLOSURE` and `AST_CLASS`. The `__declId` uniquely identifies a declaration within the
parsed code and will remain the same if the code is parsed again. This is useful to distinguish
closures declared on the same line, or multiple conditional declarations using the same name.
The ID is not unique across different codes/files.
- `\ast\parse_file` will now consistently return an empty statement list (similar to
`\ast\parse_code`) if it is was passed a zero-byte file. Previously, it would return `null`.