mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Add shared extension parser
{craft}
extensions: bcmath
shared-extensions: xdebug,swoole
sapi: cli
{/craft}
[spc_prefix:bin/spc-gnu-docker]
This commit is contained in:
parent
e5cd3adf97
commit
0e88cdb258
@ -42,7 +42,7 @@ build-options:
|
||||
# Set micro SAPI as win32 mode, without this, micro SAPI will be compiled as a console application (only for Windows, default: false)
|
||||
enable-micro-win32: false
|
||||
|
||||
# Build options for shared extensions (same as `build-shared` command options, all options are optional)
|
||||
# Build options for shared extensions (list or comma-separated are both accepted)
|
||||
shared-extensions: [ ]
|
||||
|
||||
# Download options
|
||||
|
||||
@ -164,6 +164,12 @@ class ConfigValidator
|
||||
if (is_string($craft['extensions'])) {
|
||||
$craft['extensions'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['extensions'])));
|
||||
}
|
||||
if (!isset($craft['shared-extensions'])) {
|
||||
$craft['shared-extensions'] = [];
|
||||
}
|
||||
if (is_string($craft['shared-extensions'] ?? [])) {
|
||||
$craft['shared-extensions'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['shared-extensions'])));
|
||||
}
|
||||
// check libs
|
||||
if (isset($craft['libs']) && is_string($craft['libs'])) {
|
||||
$craft['libs'] = array_filter(array_map(fn ($x) => trim($x), explode(',', $craft['libs'])));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user