From 52a115152462e3f8670b506aaaec065cbe65ab89 Mon Sep 17 00:00:00 2001 From: hacfi Date: Mon, 2 Mar 2015 04:45:26 +0100 Subject: [PATCH 1/2] Correct RegisterListenersPass namespace See https://github.com/symfony/symfony/pull/9792 --- components/event_dispatcher/introduction.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 573061b0556..15f0f67dd44 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -212,14 +212,14 @@ instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``:: and the :doc:`DependencyInjection component `, you can use the - :class:`Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterListenersPass` - from the HttpKernel component to tag services as event listeners:: + :class:`Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass` + from the EventDispatcher component to tag services as event listeners:: use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\Reference; - use Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass; + use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; $containerBuilder = new ContainerBuilder(new ParameterBag()); $containerBuilder->addCompilerPass(new RegisterListenersPass()); From 9c85f2e89a3ee9c71f7a55605762bc5adfe585c8 Mon Sep 17 00:00:00 2001 From: hacfi Date: Mon, 2 Mar 2015 08:49:06 +0100 Subject: [PATCH 2/2] Remove unnecessary component reference --- components/event_dispatcher/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 15f0f67dd44..e3f8da1916f 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -213,7 +213,7 @@ instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``:: :doc:`DependencyInjection component `, you can use the :class:`Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass` - from the EventDispatcher component to tag services as event listeners:: + to tag services as event listeners:: use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition;