I\'m in the process of upgrading Symfony from 2.8 to 3.4 and I have a Authentication Listener.
The constructor of the listener
public function __co
Issue was with the priority order.
thanks @cerad for giving a clue about it
bin/console debug:event-dispatcher kernel.request
helped to solve the issue. i was using
tags:
- { name: kernel.event_listener, event: kernel.response, method: onKernelResponse, priority: 10 }
in Services.yml and it had a conflict with the
getSubscribedEvents()
therefore i have removed tags and only kept
public static function getSubscribedEvents()
{
return array(
KernelEvents::REQUEST => array('onKernelRequest', 10),
);
}
then i moved authentication listener to the down by giving high priority to other two listeners as same as it was there in symfony 2.8
Thanks all for helping me out on this specially @Pie @Cerad and @BoShurik