Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Multiple spread classes failure to load
Browse files Browse the repository at this point in the history
Multiple spread classes will fail to be loaded into the deployer due to improper code.

Expected compiler pass result:
 $instance->addSpread(spread1);
 $instance->addSpread(spread2);
...

Current compiler pass:
$instance->addSpread(spread1,spread2,...)
  • Loading branch information
KoriSeng authored Oct 15, 2017
1 parent 744b43c commit 996753f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DependencyInjection/Compiler/AddSpreadCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ public function process(ContainerBuilder $container)
}

krsort($spreadByPriority);
$spreadByPriority = call_user_func_array('array_merge', $spreadByPriority);

foreach ($spreadByPriority as $spreads) {
$spreadDeployer->addMethodCall('addSpread', $spreads);
$spreadDeployer->addMethodCall('addSpread', [$spreads]);
}
}
}

0 comments on commit 996753f

Please sign in to comment.