From ff9c3e740887e39d21b7e7521b589728d590a98c Mon Sep 17 00:00:00 2001 From: Stephane PY Date: Thu, 23 Feb 2017 14:44:05 +0100 Subject: [PATCH] Must get reference, not definition directly. --- DependencyInjection/SpyTimelineExtension.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DependencyInjection/SpyTimelineExtension.php b/DependencyInjection/SpyTimelineExtension.php index 8429dab..7b2c07a 100644 --- a/DependencyInjection/SpyTimelineExtension.php +++ b/DependencyInjection/SpyTimelineExtension.php @@ -89,11 +89,11 @@ public function load(array $configs, ContainerBuilder $container) // result builder $definition = $container->getDefinition('spy_timeline.result_builder'); - $definition->addArgument($container->getDefinition(sprintf('spy_timeline.query_executor.%s', $driver))); + $definition->addArgument(new Reference(sprintf('spy_timeline.query_executor.%s', $driver))); $definition->addArgument($filterManager); if ($paginator) { - $definition->addMethodCall('setPager', array($container->getDefinition($paginator))); + $definition->addMethodCall('setPager', array(new Reference($paginator))); } // spreads @@ -105,7 +105,7 @@ public function load(array $configs, ContainerBuilder $container) // notifiers $notifiers = $config['notifiers']; - $definition = $container->getDefinition($config['spread']['deployer']); + $definition = new Reference($config['spread']['deployer']); foreach ($notifiers as $notifier) { $definition->addMethodCall('addNotifier', array(new Reference($notifier)));