Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AST extension #583

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"type": "external",
"source": "apcu"
},
"ast": {
"type": "external",
"source": "ast"
},
"bcmath": {
"type": "builtin"
},
Expand Down
10 changes: 10 additions & 0 deletions config/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
"path": "LICENSE"
}
},
"ast": {
"type": "url",
"url": "https://pecl.php.net/get/ast",
"path": "php-src/ext/ast",
"filename": "ast.tgz",
"license": {
"type": "file",
"path": "LICENSE"
}
},
"brotli": {
"type": "ghtar",
"repo": "google/brotli",
Expand Down
5 changes: 5 additions & 0 deletions src/globals/ext-tests/ast.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

declare(strict_types=1);

assert(function_exists('ast\parse_code'));
5 changes: 3 additions & 2 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'macos-14',
// 'macos-13',
'ubuntu-latest',
'windows-latest',
];

// whether enable thread safe
Expand All @@ -39,8 +40,8 @@

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

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