diff --git a/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php b/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php index 1a52c3e865c9d..83fc73e3eb063 100644 --- a/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php +++ b/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php @@ -81,7 +81,7 @@ public function process(ContainerBuilder $container) if (!isset($event['method'])) { $event['method'] = 'on'.preg_replace_callback([ - '/(?<=\b)[a-z]/i', + '/(?<=[\b\._])[a-z]/i', '/[^a-z0-9]/i', ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);