From f1e1bd0ea1f9855404535785344362b401777148 Mon Sep 17 00:00:00 2001 From: gregurco Date: Fri, 28 Dec 2018 18:01:11 +0200 Subject: [PATCH] Add missing imports and remove useless --- profiler/wdt_follow_ajax.rst | 4 ++++ translation.rst | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/profiler/wdt_follow_ajax.rst b/profiler/wdt_follow_ajax.rst index 6fd49c0cc2d..7918d281e54 100644 --- a/profiler/wdt_follow_ajax.rst +++ b/profiler/wdt_follow_ajax.rst @@ -21,6 +21,10 @@ Ideally this header should only be set during development and not for production. This can be accomplished by setting the header in a :ref:`kernel.response ` event listener:: + use Symfony\Component\HttpKernel\Event\FilterResponseEvent; + + // ... + public function onKernelResponse(FilterResponseEvent $event) { $response = $event->getResponse(); diff --git a/translation.rst b/translation.rst index 95f544f041b..ade3c517b1a 100644 --- a/translation.rst +++ b/translation.rst @@ -119,7 +119,6 @@ of text (called a *message*), use the for example, that you're translating a simple message from inside a controller:: // ... - use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Translation\TranslatorInterface; public function index(TranslatorInterface $translator) @@ -198,7 +197,6 @@ Message Placeholders Sometimes, a message containing a variable needs to be translated:: - use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Translation\TranslatorInterface; public function index(TranslatorInterface $translator, $name)