Skip to content

Commit 2c590e5

Browse files
committed
Define dependencies with kv array
1 parent 463a98b commit 2c590e5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/SPC/builder/Extension.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,6 @@ public function getLibraryDependencies(bool $recursive = false): array
516516
}
517517
}
518518

519-
if (array_key_exists(0, $deps)) {
520-
$zero = [0 => $deps[0]];
521-
unset($deps[0]);
522-
return $zero + $deps;
523-
}
524519
return $deps;
525520
}
526521

@@ -552,7 +547,7 @@ protected function addLibraryDependency(string $name, bool $optional = false): v
552547
}
553548
logger()->info("enabling {$this->name} without library {$name}");
554549
} else {
555-
$this->dependencies[] = $depLib;
550+
$this->dependencies[$name] = $depLib;
556551
}
557552
}
558553

@@ -565,7 +560,7 @@ protected function addExtensionDependency(string $name, bool $optional = false):
565560
}
566561
logger()->info("enabling {$this->name} without extension {$name}");
567562
} else {
568-
$this->dependencies[] = $depExt;
563+
$this->dependencies[$name] = $depExt;
569564
}
570565
}
571566

0 commit comments

Comments
 (0)