diff --git a/config/pkg/ext/ext-swow.yml b/config/pkg/ext/ext-swow.yml index eb25bc81..11592cd0 100644 --- a/config/pkg/ext/ext-swow.yml +++ b/config/pkg/ext/ext-swow.yml @@ -9,5 +9,10 @@ ext-swow: metadata: license: Apache-2.0 license-files: [LICENSE] + suggests: + - openssl + - curl + - ext-openssl + - ext-curl php-extension: arg-type: custom diff --git a/src/StaticPHP/Command/Dev/GenExtTestMatrixCommand.php b/src/StaticPHP/Command/Dev/GenExtTestMatrixCommand.php index 8621277c..ecae1705 100644 --- a/src/StaticPHP/Command/Dev/GenExtTestMatrixCommand.php +++ b/src/StaticPHP/Command/Dev/GenExtTestMatrixCommand.php @@ -62,6 +62,14 @@ class GenExtTestMatrixCommand extends BaseCommand 'intl', ]; + /** + * Extensions that are emitted as isolated standalone entries. + */ + private const array STANDALONE_ISOLATED = [ + 'swow' => '', + 'swoole' => 'swoole-hook-', + ]; + /** * Maximum number of orphan extensions per matrix entry. */ @@ -177,13 +185,34 @@ class GenExtTestMatrixCommand extends BaseCommand $groups = []; $orphans = []; $standalone_set = array_fill_keys(self::STANDALONE, true); + $standalone_isolated = self::STANDALONE_ISOLATED; foreach (array_merge($roots, $non_roots) as $ext) { if (isset($covered[$ext])) { continue; } - $chain = $this->dfsCollect($ext, $ext_deps, $pool_set, $covered); $display = $this->displayName($ext); + + if (array_key_exists($display, $standalone_isolated)) { + // Isolated standalone: mark only this ext + its hook virtuals as covered + $covered[$ext] = true; + $hook_prefix = $standalone_isolated[$display]; + $group_names = [$display]; + if ($hook_prefix !== '') { + foreach ($os_virtual as $vpkg => $_) { + $vdisplay = $this->displayName($vpkg); + if (str_starts_with($vdisplay, $hook_prefix) && !isset($covered[$vpkg])) { + $covered[$vpkg] = true; + $group_names[] = $vdisplay; + } + } + sort($group_names); + } + $groups[] = implode(',', $group_names); + continue; + } + + $chain = $this->dfsCollect($ext, $ext_deps, $pool_set, $covered); if (isset($standalone_set[$display])) { // Always emit standalone extensions as their own single entry $groups[] = $display;