Fix loadbefore sometimes not working (#3040)

loadbefore operates by injecting self into the target plugin's soft-dependencies. The problem is that these soft-dependency lists are overwritten if the target plugin's soft-dependencies are resolved after the loadbefore of the origin plugin.
This commit is contained in:
TheNewHEROBRINEX 2019-07-17 17:52:29 +02:00 committed by Dylan T
parent d874be99a6
commit 73d3f9f7f7

View File

@ -286,7 +286,7 @@ class PluginManager{
$plugins[$name] = $file;
$softDependencies[$name] = $description->getSoftDepend();
$softDependencies[$name] = array_merge($softDependencies[$name] ?? [], $description->getSoftDepend());
$dependencies[$name] = $description->getDepend();
foreach($description->getLoadBefore() as $before){