Skip to content

Commit 20dad4c

Browse files
authored
Merge pull request #583 from Halleck45/support_ast_extension
Support AST extension
1 parent a3e0ad6 commit 20dad4c

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

config/ext.json

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
"type": "external",
1818
"source": "apcu"
1919
},
20+
"ast": {
21+
"type": "external",
22+
"source": "ast"
23+
},
2024
"bcmath": {
2125
"type": "builtin"
2226
},

config/source.json

+10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
"path": "LICENSE"
2727
}
2828
},
29+
"ast": {
30+
"type": "url",
31+
"url": "https://pecl.php.net/get/ast",
32+
"path": "php-src/ext/ast",
33+
"filename": "ast.tgz",
34+
"license": {
35+
"type": "file",
36+
"path": "LICENSE"
37+
}
38+
},
2939
"brotli": {
3040
"type": "ghtar",
3141
"repo": "google/brotli",

src/globals/ext-tests/ast.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
assert(function_exists('ast\parse_code'));

src/globals/test-extensions.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
'macos-14',
2525
// 'macos-13',
2626
'ubuntu-latest',
27+
'windows-latest',
2728
];
2829

2930
// whether enable thread safe
@@ -39,8 +40,8 @@
3940

4041
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
4142
$extensions = match (PHP_OS_FAMILY) {
42-
'Linux', 'Darwin' => 'openssl',
43-
'Windows' => 'openssl',
43+
'Linux', 'Darwin' => 'ast',
44+
'Windows' => 'ast',
4445
};
4546

4647
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).

0 commit comments

Comments
 (0)