diff --git a/DependencyInjection/FOSRestExtension.php b/DependencyInjection/FOSRestExtension.php index d9d004a93..9b508b8bd 100644 --- a/DependencyInjection/FOSRestExtension.php +++ b/DependencyInjection/FOSRestExtension.php @@ -99,7 +99,7 @@ private function loadAccessDeniedListener(array $config, XmlFileLoader $loader, $loader->load('access_denied_listener.xml'); if (!empty($config['access_denied_listener']['service'])) { - $service = $container->getDefinition('fos_rest.allowed_methods_listener'); + $service = $container->getDefinition('fos_rest.access_denied_listener'); $service->clearTag('kernel.event_listener'); }