Define dependencies with kv array

This commit is contained in:
crazywhalecc 2025-11-04 15:52:52 +08:00
parent 463a98b1bf
commit 2c590e5895
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

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;
}
@ -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;
}
}