src/EventSubscriber/AjaxDebugUpdateSubscriber.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\EventSubscriber;
  3. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  4. use Symfony\Component\HttpKernel\Event\ResponseEvent;
  5. use Symfony\Component\HttpKernel\KernelEvents;
  6. class AjaxDebugUpdateSubscriber implements EventSubscriberInterface
  7. {
  8.     public function onKernelResponse(ResponseEvent $event): void
  9.     {
  10.         $response $event->getResponse();
  11.         $response->headers->set('Symfony-Debug-Toolbar-Replace'0);
  12.     }
  13.     /**
  14.      * @inheritDoc
  15.      */
  16.     public static function getSubscribedEvents()
  17.     {
  18.         return [
  19.             KernelEvents::RESPONSE => ['onKernelResponse'],
  20.         ];
  21.     }
  22. }