Symfony 4 : ignore kernel events coming from debug toolbar
问题 I'm quite new to Symfony so forgive me if it seems obvious for you :) For my project, i need to perform some actions depending on the url. I use kernel events, more specifically the kernel request to do so. In services.yaml : App\Service\UrlManager: tags: - { name: kernel.event_listener, event: kernel.request} In UrlManager.php : public function onKernelRequest(GetResponseEvent $event) { $request = Request::createFromGlobals(); $hostname = parse_url($request->server->get('HTTP_HOST'),PHP_URL