From 2c590e58959832d20ca82a93924e9c32d627149f Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 4 Nov 2025 15:52:52 +0800 Subject: [PATCH] Define dependencies with kv array --- src/SPC/builder/Extension.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/SPC/builder/Extension.php b/src/SPC/builder/Extension.php index a6c6ab94..c9cd0657 100644 --- a/src/SPC/builder/Extension.php +++ b/src/SPC/builder/Extension.php @@ -516,11 +516,6 @@ class Extension } } - if (array_key_exists(0, $deps)) { - $zero = [0 => $deps[0]]; - unset($deps[0]); - return $zero + $deps; - } return $deps; } @@ -552,7 +547,7 @@ class Extension } logger()->info("enabling {$this->name} without library {$name}"); } else { - $this->dependencies[] = $depLib; + $this->dependencies[$name] = $depLib; } } @@ -565,7 +560,7 @@ class Extension } logger()->info("enabling {$this->name} without extension {$name}"); } else { - $this->dependencies[] = $depExt; + $this->dependencies[$name] = $depExt; } }