From 61eafa48ff4b5d696d6cb28b6109277068796dc6 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 18 Apr 2025 12:18:20 +0800 Subject: [PATCH] Add static extension filter --- src/SPC/command/BuildPHPCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SPC/command/BuildPHPCommand.php b/src/SPC/command/BuildPHPCommand.php index d2cf1d75..49067b0b 100644 --- a/src/SPC/command/BuildPHPCommand.php +++ b/src/SPC/command/BuildPHPCommand.php @@ -130,6 +130,10 @@ class BuildPHPCommand extends BuildCommand $display_libs = array_filter($libraries, fn ($lib) => in_array(Config::getLib($lib, 'type', 'lib'), ['lib', 'package'])); $display_extensions = array_map(fn ($ext) => in_array($ext, $shared_extensions) ? "*{$ext}" : $ext, $extensions); + // separate static and shared extensions from $extensions + // filter rule: including shared extensions if they are in $static_extensions or $shared_extensions + $static_extensions = array_filter($extensions, fn ($ext) => !in_array($ext, $shared_extensions) || in_array($ext, $static_extensions)); + // print info $indent_texts = [ 'Build OS' => PHP_OS_FAMILY . ' (' . php_uname('m') . ')',