Skip to content

Commit fec004c

Browse files
authored
Properly namespace #[\AllowDynamicProperties] in documentation (#220)
This was previously resolved relative to the `ast\` namespace in type checkers or if gen_stubs supported attributes in the future.
1 parent 8f1e75f commit fec004c

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

ast.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function get_supported_versions(bool $exclude_deprecated = false): array {}
3232
/**
3333
* This class describes a single node in a PHP AST.
3434
*/
35-
#[AllowDynamicProperties]
35+
#[\AllowDynamicProperties]
3636
class Node
3737
{
3838
public function __construct(?int $kind = null, ?int $flags = null, ?array $children = null, ?int $lineno = null) {

ast_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: d7ef66b95afbb59ff4fba8ab475785c699c07173 */
2+
* Stub hash: bd6cdcf553c8e2d0fa06a42f9ff86e716544f817 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_ast_parse_code, 0, 2, ast\\Node, 0)
55
ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0)

package.xml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@
1818
<email>[email protected]</email>
1919
<active>yes</active>
2020
</lead>
21-
<date>2021-11-27</date>
21+
<date>2022-02-12</date>
2222
<version>
23-
<release>1.0.16</release>
24-
<api>1.0.16</api>
23+
<release>1.0.17dev</release>
24+
<api>1.0.17dev</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-
- Optimize instantiating properties of ast\Node and ast\Metadata.
33-
- Document that ast\Node implements `#[AllowDynamicProperties]` in php 8.2
32+
- Change documentation files to properly namespace attributes as `#[\AllowDynamicProperties]`. The reflection attributes are already correct.
3433
</notes>
3534
<contents>
3635
<dir name="/">
@@ -144,6 +143,22 @@
144143
<providesextension>ast</providesextension>
145144
<extsrcrelease />
146145
<changelog>
146+
<release>
147+
<date>2021-11-27</date>
148+
<version>
149+
<release>1.0.16</release>
150+
<api>1.0.16</api>
151+
</version>
152+
<stability>
153+
<release>stable</release>
154+
<api>stable</api>
155+
</stability>
156+
<license uri="https://github.com/nikic/php-ast/blob/master/LICENSE">BSD-3-Clause</license>
157+
<notes>
158+
- Optimize instantiating properties of ast\Node and ast\Metadata.
159+
- Document that ast\Node implements `#[AllowDynamicProperties]` in php 8.2
160+
</notes>
161+
</release>
147162
<release>
148163
<date>2021-11-27</date>
149164
<version>

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

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

0 commit comments

Comments
 (0)