From c4cec15c188d05e8f3e826345f598406b0d0f2bc Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Thu, 11 Dec 2025 14:45:35 +0800 Subject: [PATCH] Use container instead of passing --- .../Runtime/Executor/WindowsCMakeExecutor.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/StaticPHP/Runtime/Executor/WindowsCMakeExecutor.php b/src/StaticPHP/Runtime/Executor/WindowsCMakeExecutor.php index 1fb9c72b..9e097819 100644 --- a/src/StaticPHP/Runtime/Executor/WindowsCMakeExecutor.php +++ b/src/StaticPHP/Runtime/Executor/WindowsCMakeExecutor.php @@ -35,16 +35,10 @@ class WindowsCMakeExecutor extends Executor protected PackageInstaller $installer; - public function __construct(protected LibraryPackage $package, ?PackageBuilder $builder = null) + public function __construct(protected LibraryPackage $package) { parent::__construct($this->package); - if ($builder !== null) { - $this->builder = $builder; - } elseif (ApplicationContext::has(PackageBuilder::class)) { - $this->builder = ApplicationContext::get(PackageBuilder::class); - } else { - throw new SPCInternalException('PackageBuilder not found in ApplicationContext.'); - } + $this->builder = ApplicationContext::get(PackageBuilder::class); $this->installer = ApplicationContext::get(PackageInstaller::class); $this->initCmd();