Commit a88fc53b authored by Crell's avatar Crell
Browse files

Turn the cache subscriber into a termination subscriber, not a response...

Turn the cache subscriber into a termination subscriber, not a response subscriber.  Still needs work.
parent b99d11fa
......@@ -24,7 +24,7 @@
use Drupal\Core\EventSubscriber\PathSubscriber;
use Drupal\Core\EventSubscriber\LegacyControllerSubscriber;
use Drupal\Core\EventSubscriber\MaintenanceModeSubscriber;
use Drupal\Core\EventSubscriber\ResponseSubscriber;
use Drupal\Core\EventSubscriber\RequestCloseSubscriber;
use Exception;
......@@ -75,7 +75,7 @@ public function __construct(EventDispatcherInterface $dispatcher, ControllerReso
$this->dispatcher->addSubscriber(new MaintenanceModeSubscriber());
$this->dispatcher->addSubscriber(new PathSubscriber());
$this->dispatcher->addSubscriber(new LegacyControllerSubscriber());
$this->dispatcher->addSubscriber(new ResponseSubscriber());
$this->dispatcher->addSubscriber(new RequestCloseSubscriber());
// Some other form of error occured that wasn't handled by another kernel
// listener. That could mean that it's a method/mime-type/error
......
......@@ -17,7 +17,7 @@
/**
* Subscriber for all responses.
*/
class ResponseSubscriber implements EventSubscriberInterface {
class RequestCloseSubscriber implements EventSubscriberInterface {
/**
* Performs end of request tasks.
......@@ -30,7 +30,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
* @param FilterResponseEvent $event
* The Event to process.
*/
public function onKernelResponse(FilterResponseEvent $event) {
public function onTerminate(FilterResponseEvent $event) {
global $user;
module_invoke_all('exit');
......@@ -60,7 +60,7 @@ public function onKernelResponse(FilterResponseEvent $event) {
* An array of event listener definitions.
*/
static function getSubscribedEvents() {
$events[KernelEvents::RESPONSE][] = array('onKernelResponse');
$events[KernelEvents::TERMINATE][] = array('onTerminate');
return $events;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment