From 72447479e6ea7333cf8c92bee34b4a6aec91852b Mon Sep 17 00:00:00 2001 From: Denes Papp Date: Tue, 18 Apr 2017 23:08:30 +0200 Subject: [PATCH] Fixed fatal error in dependency injection config `$definition->addMethodCall(...)` on L111 results in `Fatal error: Call to undefined method Symfony\Component\DependencyInjection\Reference::addMethodCall()`. This is because `$definition` is `Reference` type, though it should be `Definition` type which has the `addMethodCall` method see https://github.com/stephpy/timeline-bundle/commit/ff9c3e740887e39d21b7e7521b589728d590a98c#commitcomment-21808406 for more details --- DependencyInjection/SpyTimelineExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/SpyTimelineExtension.php b/DependencyInjection/SpyTimelineExtension.php index 7b2c07a..293ea02 100644 --- a/DependencyInjection/SpyTimelineExtension.php +++ b/DependencyInjection/SpyTimelineExtension.php @@ -105,7 +105,7 @@ public function load(array $configs, ContainerBuilder $container) // notifiers $notifiers = $config['notifiers']; - $definition = new Reference($config['spread']['deployer']); + $definition = $container->getDefinition($config['spread']['deployer']); foreach ($notifiers as $notifier) { $definition->addMethodCall('addNotifier', array(new Reference($notifier)));