diff --git a/docs/deps-craft-yml.md b/docs/deps-craft-yml.md index 1b824e0b..0ee0e11d 100644 --- a/docs/deps-craft-yml.md +++ b/docs/deps-craft-yml.md @@ -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 diff --git a/src/SPC/util/ConfigValidator.php b/src/SPC/util/ConfigValidator.php index eae2ef2b..dbc8ce23 100644 --- a/src/SPC/util/ConfigValidator.php +++ b/src/SPC/util/ConfigValidator.php @@ -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'])));