<?php
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
class AjaxDebugUpdateSubscriber implements EventSubscriberInterface
{
public function onKernelResponse(ResponseEvent $event): void
{
$response = $event->getResponse();
$response->headers->set('Symfony-Debug-Toolbar-Replace', 0);
}
/**
* @inheritDoc
*/
public static function getSubscribedEvents()
{
return [
KernelEvents::RESPONSE => ['onKernelResponse'],
];
}
}