Define dependencies with kv array

This commit is contained in:
crazywhalecc
2025-11-04 15:52:52 +08:00
parent 463a98b1bf
commit 2c590e5895

View File

@@ -516,11 +516,6 @@ class Extension
} }
} }
if (array_key_exists(0, $deps)) {
$zero = [0 => $deps[0]];
unset($deps[0]);
return $zero + $deps;
}
return $deps; return $deps;
} }
@@ -552,7 +547,7 @@ class Extension
} }
logger()->info("enabling {$this->name} without library {$name}"); logger()->info("enabling {$this->name} without library {$name}");
} else { } else {
$this->dependencies[] = $depLib; $this->dependencies[$name] = $depLib;
} }
} }
@@ -565,7 +560,7 @@ class Extension
} }
logger()->info("enabling {$this->name} without extension {$name}"); logger()->info("enabling {$this->name} without extension {$name}");
} else { } else {
$this->dependencies[] = $depExt; $this->dependencies[$name] = $depExt;
} }
} }