From 996753f57e03800297a3866af54c6c82ffb9d383 Mon Sep 17 00:00:00 2001 From: Kori <7th.cubic.sg@gmail.com> Date: Sun, 15 Oct 2017 14:45:13 +0800 Subject: [PATCH] Multiple spread classes failure to load 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,...) --- DependencyInjection/Compiler/AddSpreadCompilerPass.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Compiler/AddSpreadCompilerPass.php b/DependencyInjection/Compiler/AddSpreadCompilerPass.php index 5f83012..86b85de 100644 --- a/DependencyInjection/Compiler/AddSpreadCompilerPass.php +++ b/DependencyInjection/Compiler/AddSpreadCompilerPass.php @@ -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]); } } }