Skip to content

Commit 4221ed4

Browse files
authored
Release php-ast version 1.0.7 (nikic#163)
Add missing test files. Update the changelog entry. This will let projects using php-ast start using php 8.0's attributes/match expressions.
1 parent 1b5d767 commit 4221ed4

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ ast\flags\CLASS_ANONYMOUS
256256
// Used by ast\AST_PARAM (combinable)
257257
ast\flags\PARAM_REF
258258
ast\flags\PARAM_VARIADIC
259-
ast\flags\MODIFIER_PUBLIC
260-
ast\flags\MODIFIER_PROTECTED
261-
ast\flags\MODIFIER_PRIVATE
259+
ast\flags\MODIFIER_PUBLIC (only in php 8.0+)
260+
ast\flags\MODIFIER_PROTECTED (only in php 8.0+)
261+
ast\flags\MODIFIER_PRIVATE (only in php 8.0+)
262262
263263
// Used by ast\AST_TYPE (exclusive)
264264
ast\flags\TYPE_ARRAY

package.xml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,24 @@
1818
<email>[email protected]</email>
1919
<active>yes</active>
2020
</lead>
21-
<date>2020-02-22</date>
21+
<date>2020-07-11</date>
2222
<version>
23-
<release>1.0.7dev</release>
24-
<api>1.0.7dev</api>
23+
<release>1.0.7</release>
24+
<api>1.0.7</api>
2525
</version>
2626
<stability>
2727
<release>stable</release>
2828
<api>stable</api>
2929
</stability>
3030
<license uri="https://github.com/nikic/php-ast/blob/master/LICENSE">BSD-3-Clause</license>
3131
<notes>
32-
- Add the experimental version 80, which returns `mixed` types as an `AST_TYPE` with type `TYPE_MIXED` instead of an `AST_NAME`.
32+
- Add the experimental AST version 80
33+
- In AST version 80, support returning `mixed` types as an `AST_TYPE` with type `TYPE_MIXED` instead of an `AST_NAME`.
34+
- In AST version 80, support PHP 8.0 attributes for declarations.
35+
- Support PHP 8.0's Match expressions.
36+
- Support PHP 8.0 constructor property promotion, and allow indicating visibility on AST nodes.
37+
Note that `MODIFIER_PUBLIC` and `ast\AST_PARAM` modifiers had overlap in php 7.4,
38+
so the `MODIFIER_*` modifiers are only included in the provided metadata for php 8.0+
3339
</notes>
3440
<contents>
3541
<dir name="/">
@@ -56,9 +62,9 @@
5662
<file name="by_ref_destructuring.phpt" role="test" />
5763
<file name="class_consts.phpt" role="test" />
5864
<file name="class_consts_80.phpt" role="test" />
59-
<file name="class_on_objects.phpt" role="test" />
6065
<file name="class_name_version_50.phpt" role="test" />
6166
<file name="class_name_version_70.phpt" role="test" />
67+
<file name="class_on_objects.phpt" role="test" />
6268
<file name="class.phpt" role="test" />
6369
<file name="class_types.phpt" role="test" />
6470
<file name="closure_use_vars.phpt" role="test" />
@@ -97,9 +103,12 @@
97103
<file name="php74_ordinary_class.phpt" role="test" />
98104
<file name="php74_parenthesized_conditional.phpt" role="test" />
99105
<file name="php74_type_hints.phpt" role="test" />
106+
<file name="php80_noncapturing_catch.phpt" role="test" />
107+
<file name="php80_promotion.phpt" role="test" />
108+
<file name="php80_static_type.phpt" role="test" />
100109
<file name="php80_union_types.phpt" role="test" />
110+
<file name="php80_union_types_false.phpt" role="test" />
101111
<file name="php80_union_types_nullable.phpt" role="test" />
102-
<file name="php80_static_type.phpt" role="test" />
103112
<file name="prop_doc_comments.phpt" role="test" />
104113
<file name="short_arrow_function.phpt" role="test" />
105114
<file name="short_arrow_function_return.phpt" role="test" />

php_ast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
extern zend_module_entry ast_module_entry;
88
#define phpext_ast_ptr &ast_module_entry
99

10-
#define PHP_AST_VERSION "1.0.7dev"
10+
#define PHP_AST_VERSION "1.0.7"
1111

1212
#ifdef PHP_WIN32
1313
# define PHP_AST_API __declspec(dllexport)

0 commit comments

Comments
 (0)