Symfony2 : onKernelResponse called twice as MASTER_REQUEST
问题 I'm using the event listener onKernelResponse . Despite I used : if (HttpKernelInterface::MASTER_REQUEST != $event->getRequestType()) { return; } It's having a MASTER_REQUEST twice in my action, there is one before the <!DOCTYPE html> <html> <head> etc, and the other one as excepted after the end of the layout. He is my services.yml : history.listener: class: VENDOR\MyBundle\Service\HistoryListener arguments: [@doctrine.orm.entity_manager, @logger, @history] tags: - { name: kernel.event