From 1ac621fb9c8d7d001bb1fa23cf1bea3c5b226cdb Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 5 Sep 2025 15:20:24 +0700 Subject: [PATCH 1/5] use our toolchain for go mod --- src/SPC/builder/unix/UnixBuilderBase.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index f627d6d9..014db389 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -257,6 +257,7 @@ abstract class UnixBuilderBase extends BuilderBase protected function buildFrankenphp(): void { + GlobalEnvManager::addPathIfNotExists(GoXcaddy::getEnvironment()['PATH']); $nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : ''; $nowatcher = $this->getLib('watcher') === null ? ',nowatcher' : ''; $xcaddyModules = getenv('SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES'); @@ -312,9 +313,7 @@ abstract class UnixBuilderBase extends BuilderBase 'LD_LIBRARY_PATH' => BUILD_LIB_PATH, ]; foreach (GoXcaddy::getEnvironment() as $key => $value) { - if ($key === 'PATH') { - GlobalEnvManager::addPathIfNotExists($value); - } else { + if ($key !== 'PATH') { $env[$key] = $value; } } From d45b1853f89f80d287d285c58c69565dbe38a106 Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 5 Sep 2025 15:28:51 +0700 Subject: [PATCH 2/5] fix cs --- src/SPC/exception/ValidationException.php | 4 ++-- src/SPC/util/LicenseDumper.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SPC/exception/ValidationException.php b/src/SPC/exception/ValidationException.php index 3af44303..3d51ad48 100644 --- a/src/SPC/exception/ValidationException.php +++ b/src/SPC/exception/ValidationException.php @@ -14,9 +14,9 @@ use SPC\builder\Extension; */ class ValidationException extends SPCException { - private null|array|string $validation_module = null; + private array|string|null $validation_module = null; - public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, null|array|string $validation_module = null) + public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null, array|string|null $validation_module = null) { parent::__construct($message, $code, $previous); diff --git a/src/SPC/util/LicenseDumper.php b/src/SPC/util/LicenseDumper.php index 8ba17c91..6a40a73a 100644 --- a/src/SPC/util/LicenseDumper.php +++ b/src/SPC/util/LicenseDumper.php @@ -117,7 +117,7 @@ class LicenseDumper /** * Loads a source license file from the specified path. */ - private function loadSourceFile(string $source_name, int $index, null|array|string $in_path, ?string $custom_base_path = null): string + private function loadSourceFile(string $source_name, int $index, array|string|null $in_path, ?string $custom_base_path = null): string { if (is_null($in_path)) { throw new SPCInternalException("source [{$source_name}] license file is not set, please check config/source.json"); From 5c803d155368f12323ea93fb385498ca9eb921ba Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 5 Sep 2025 15:31:30 +0700 Subject: [PATCH 3/5] fix cs --- src/SPC/builder/unix/UnixBuilderBase.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index 014db389..3beca8bf 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -10,8 +10,6 @@ use SPC\exception\SPCInternalException; use SPC\exception\ValidationException; use SPC\exception\WrongUsageException; use SPC\store\Config; -use SPC\store\CurlHook; -use SPC\store\Downloader; use SPC\store\FileSystem; use SPC\store\pkg\GoXcaddy; use SPC\toolchain\GccNativeToolchain; From 9df2867175cf0d6d1c1603723b71f92ec74c70aa Mon Sep 17 00:00:00 2001 From: henderkes Date: Fri, 5 Sep 2025 15:52:07 +0700 Subject: [PATCH 4/5] just always require libxml2 until we rework sapis to require their own stuff --- config/lib.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/lib.json b/config/lib.json index 7d1ad213..aac3e156 100644 --- a/config/lib.json +++ b/config/lib.json @@ -17,6 +17,9 @@ "lib-suggests-unix": [ "brotli", "watcher" + ], + "lib-depends-darwin": [ + "libxml2" ] }, "micro": { From 15f8887f14051b9e0ba297bc163a20b350076377 Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 5 Sep 2025 16:25:15 +0700 Subject: [PATCH 5/5] Update config/lib.json --- config/lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/lib.json b/config/lib.json index aac3e156..bda0baad 100644 --- a/config/lib.json +++ b/config/lib.json @@ -18,7 +18,7 @@ "brotli", "watcher" ], - "lib-depends-darwin": [ + "lib-depends-macos": [ "libxml2" ] },