diff --git a/DependencyInjection/RegisterListenersPass.php b/DependencyInjection/RegisterListenersPass.php index 47fa9ce..866f4e6 100644 --- a/DependencyInjection/RegisterListenersPass.php +++ b/DependencyInjection/RegisterListenersPass.php @@ -91,7 +91,7 @@ public function process(ContainerBuilder $container) if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method'])) { if (!$r->hasMethod('__invoke')) { - throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "foo". Please define the "method" attribute on "kernel.event_listener" tags.', $event['method'], $id)); + throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "kernel.event_listener" tags.', $event['method'], $id)); } $event['method'] = '__invoke';