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

Commit

Permalink
Fixed fatal error in dependency injection config
Browse files Browse the repository at this point in the history
`$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
ff9c3e7#commitcomment-21808406
for more details
  • Loading branch information
pppdns committed Apr 18, 2017
1 parent 281e327 commit 7244747
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DependencyInjection/SpyTimelineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit 7244747

Please sign in to comment.