Skip to content

Commit a6e1f88

Browse files
TysonAndrenikic
authored andcommitted
Release php-ast 1.0.2
And put together release notes.
1 parent 0f9c680 commit a6e1f88

File tree

3 files changed

+62
-59
lines changed

3 files changed

+62
-59
lines changed

ast_stub.php

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
const AST_FUNC_DECL = 67;
3131
const AST_CLOSURE = 68;
3232
const AST_METHOD = 69;
33+
const AST_ARROW_FUNC = 1535;
3334
const AST_CLASS = 70;
3435
const AST_MAGIC_CONST = 0;
3536
const AST_TYPE = 1;
@@ -50,18 +51,18 @@
5051
const AST_POST_INC = 273;
5152
const AST_POST_DEC = 274;
5253
const AST_YIELD_FROM = 275;
53-
const AST_GLOBAL = 277;
54-
const AST_UNSET = 278;
55-
const AST_RETURN = 279;
56-
const AST_LABEL = 280;
57-
const AST_REF = 281;
58-
const AST_HALT_COMPILER = 282;
59-
const AST_ECHO = 283;
60-
const AST_THROW = 284;
61-
const AST_GOTO = 285;
62-
const AST_BREAK = 286;
63-
const AST_CONTINUE = 287;
64-
const AST_CLASS_NAME = 276;
54+
const AST_GLOBAL = 276;
55+
const AST_UNSET = 277;
56+
const AST_RETURN = 278;
57+
const AST_LABEL = 279;
58+
const AST_REF = 280;
59+
const AST_HALT_COMPILER = 281;
60+
const AST_ECHO = 282;
61+
const AST_THROW = 283;
62+
const AST_GOTO = 284;
63+
const AST_BREAK = 285;
64+
const AST_CONTINUE = 286;
65+
const AST_CLASS_NAME = 511;
6566
const AST_DIM = 512;
6667
const AST_PROP = 513;
6768
const AST_STATIC_PROP = 514;
@@ -75,23 +76,23 @@
7576
const AST_NEW = 526;
7677
const AST_INSTANCEOF = 527;
7778
const AST_YIELD = 528;
78-
const AST_STATIC = 531;
79-
const AST_WHILE = 532;
80-
const AST_DO_WHILE = 533;
81-
const AST_IF_ELEM = 534;
82-
const AST_SWITCH = 535;
83-
const AST_SWITCH_CASE = 536;
84-
const AST_DECLARE = 537;
79+
const AST_STATIC = 530;
80+
const AST_WHILE = 531;
81+
const AST_DO_WHILE = 532;
82+
const AST_IF_ELEM = 533;
83+
const AST_SWITCH = 534;
84+
const AST_SWITCH_CASE = 535;
85+
const AST_DECLARE = 536;
8586
const AST_PROP_ELEM = 774;
86-
const AST_PROP_GROUP = 545;
87+
const AST_PROP_GROUP = 767;
8788
const AST_CONST_ELEM = 775;
88-
const AST_USE_TRAIT = 538;
89-
const AST_TRAIT_PRECEDENCE = 539;
90-
const AST_METHOD_REFERENCE = 540;
91-
const AST_NAMESPACE = 541;
92-
const AST_USE_ELEM = 542;
93-
const AST_TRAIT_ALIAS = 543;
94-
const AST_GROUP_USE = 544;
89+
const AST_USE_TRAIT = 537;
90+
const AST_TRAIT_PRECEDENCE = 538;
91+
const AST_METHOD_REFERENCE = 539;
92+
const AST_NAMESPACE = 540;
93+
const AST_USE_ELEM = 541;
94+
const AST_TRAIT_ALIAS = 542;
95+
const AST_GROUP_USE = 543;
9596
const AST_METHOD_CALL = 768;
9697
const AST_STATIC_CALL = 769;
9798
const AST_CONDITIONAL = 770;
@@ -107,22 +108,22 @@
107108
const NAME_FQ = 0;
108109
const NAME_NOT_FQ = 1;
109110
const NAME_RELATIVE = 2;
110-
const MODIFIER_PUBLIC = 1;
111-
const MODIFIER_PROTECTED = 2;
112-
const MODIFIER_PRIVATE = 4;
113-
const MODIFIER_STATIC = 16;
114-
const MODIFIER_ABSTRACT = 64;
115-
const MODIFIER_FINAL = 32;
116-
const RETURNS_REF = 2048;
117-
const FUNC_RETURNS_REF = 2048;
111+
const MODIFIER_PUBLIC = 256;
112+
const MODIFIER_PROTECTED = 512;
113+
const MODIFIER_PRIVATE = 1024;
114+
const MODIFIER_STATIC = 1;
115+
const MODIFIER_ABSTRACT = 2;
116+
const MODIFIER_FINAL = 4;
117+
const RETURNS_REF = 67108864;
118+
const FUNC_RETURNS_REF = 67108864;
118119
const FUNC_GENERATOR = 8388608;
119120
const ARRAY_ELEM_REF = 1;
120121
const CLOSURE_USE_REF = 1;
121-
const CLASS_ABSTRACT = 64;
122-
const CLASS_FINAL = 32;
123-
const CLASS_TRAIT = 2;
124-
const CLASS_INTERFACE = 1;
125-
const CLASS_ANONYMOUS = 4;
122+
const CLASS_ABSTRACT = 32;
123+
const CLASS_FINAL = 4;
124+
const CLASS_TRAIT = 128;
125+
const CLASS_INTERFACE = 64;
126+
const CLASS_ANONYMOUS = 256;
126127
const PARAM_REF = 1;
127128
const PARAM_VARIADIC = 2;
128129
const TYPE_NULL = 1;
@@ -173,14 +174,14 @@
173174
const USE_NORMAL = 1;
174175
const USE_FUNCTION = 2;
175176
const USE_CONST = 4;
176-
const MAGIC_LINE = 371;
177-
const MAGIC_FILE = 372;
178-
const MAGIC_DIR = 373;
179-
const MAGIC_NAMESPACE = 390;
180-
const MAGIC_FUNCTION = 377;
181-
const MAGIC_METHOD = 376;
182-
const MAGIC_CLASS = 374;
183-
const MAGIC_TRAIT = 375;
177+
const MAGIC_LINE = 370;
178+
const MAGIC_FILE = 371;
179+
const MAGIC_DIR = 372;
180+
const MAGIC_NAMESPACE = 389;
181+
const MAGIC_FUNCTION = 376;
182+
const MAGIC_METHOD = 375;
183+
const MAGIC_CLASS = 373;
184+
const MAGIC_TRAIT = 374;
184185
const ARRAY_SYNTAX_LIST = 1;
185186
const ARRAY_SYNTAX_LONG = 2;
186187
const ARRAY_SYNTAX_SHORT = 3;

package.xml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,21 @@
1212
<email>[email protected]</email>
1313
<active>yes</active>
1414
</lead>
15-
<date>2019-02-11</date>
15+
<date>2019-06-30</date>
1616
<version>
17-
<release>1.0.2dev</release>
18-
<api>1.0.1</api>
17+
<release>1.0.2</release>
18+
<api>1.0.2</api>
1919
</version>
2020
<stability>
2121
<release>stable</release>
2222
<api>stable</api>
2323
</stability>
2424
<license uri="https://github.com/nikic/php-ast/blob/master/LICENSE">BSD-3-Clause</license>
2525
<notes>
26-
- Fix compatibility with (currenty) PHP 7.4 and PHP 8.0.
27-
- Support BINARY_COALESCE as a flag of AST_ASSIGN_OP for the `??=` operator added in PHP 7.4.
28-
- Add AST version 70 (experimental):
29-
- Version 70 adds AST_PROP_GROUP with type information for property groups.
30-
- Version 70 adds AST_CLASS_NAME for `Foo::class`. Previously this used AST_CLASS_CONST
26+
- Fix compatibility with (currently) PHP 7.4 and PHP 8.0.
27+
- Support AST_ARROW_FUNC for PHP 7.4.
28+
- Make $version a required parameter for `ast\parse_*`. Previously, the absence would throw a LogicException.
29+
- Make AST version 70 the current version.
3130
</notes>
3231
<contents>
3332
<dir name="/">
@@ -57,6 +56,7 @@
5756
<file name="class_types.phpt" role="test" />
5857
<file name="closure_use_vars.phpt" role="test" />
5958
<file name="coalesce.phpt" role="test" />
59+
<file name="concat.phpt" role="test" />
6060
<file name="constructor.phpt" role="test" />
6161
<file name="decl_ids.phpt" role="test" />
6262
<file name="decl_normalization.phpt" role="test" />
@@ -87,6 +87,8 @@
8787
<file name="php74_ordinary_class.phpt" role="test" />
8888
<file name="php74_type_hints.phpt" role="test" />
8989
<file name="prop_doc_comments.phpt" role="test" />
90+
<file name="short_arrow_function.phpt" role="test" />
91+
<file name="short_arrow_function_return.phpt" role="test" />
9092
<file name="stmt_list.phpt" role="test" />
9193
<file name="try_catch_finally.phpt" role="test" />
9294
<file name="type_hints.phpt" role="test" />
@@ -114,7 +116,7 @@
114116
<release>
115117
<date>2019-02-11</date>
116118
<version>
117-
<release>1.0.2dev</release>
119+
<release>1.0.1</release>
118120
<api>1.0.1</api>
119121
</version>
120122
<stability>
@@ -123,7 +125,7 @@
123125
</stability>
124126
<license uri="https://github.com/nikic/php-ast/blob/master/LICENSE">BSD-3-Clause</license>
125127
<notes>
126-
- Fix compatibility with (currenty) PHP 7.4 and PHP 8.0.
128+
- Fix compatibility with (currently) PHP 7.4 and PHP 8.0.
127129
- Support BINARY_COALESCE as a flag of AST_ASSIGN_OP for the `??=` operator added in PHP 7.4.
128130
- Add AST version 70 (experimental):
129131
- Version 70 adds AST_PROP_GROUP with type information for property groups.

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.2dev"
10+
#define PHP_AST_VERSION "1.0.2"
1111

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

0 commit comments

Comments
 (0)