Commit 51625ae4 authored by catch's avatar catch
Browse files

Issue #3094398 by martin107, alexpott, andypost, klausi: Update Symfony...

Issue #3094398 by martin107, alexpott, andypost, klausi: Update Symfony response and request events to new classes

(cherry picked from commit ca1aa9e4)
parent be7e3036
......@@ -6,7 +6,7 @@
use Drupal\Core\Site\Settings;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -73,10 +73,10 @@ public function trigger() {
/**
* Checks and disables the replica database server if appropriate.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The Event to process.
*/
public function checkReplicaServer(GetResponseEvent $event) {
public function checkReplicaServer(RequestEvent $event) {
// Ignore replica database servers for this request.
//
// In Drupal's distributed database structure, new data is written to the
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Path\PathMatcherInterface;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -72,10 +72,10 @@ public function __construct(AccountInterface $current_user, CurrentPathStack $cu
/**
* Sets the 'is-active' class on links.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The response event.
*/
public function onResponse(FilterResponseEvent $event) {
public function onResponse(ResponseEvent $event) {
$response = $event->getResponse();
// Only care about HTML responses.
......
......@@ -6,8 +6,8 @@
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Render\AttachmentsResponseProcessorInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -40,10 +40,10 @@ public function __construct(AttachmentsResponseProcessorInterface $ajax_response
/**
* Sets the AJAX parameter from the current request.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The response event, which contains the current request.
*/
public function onRequest(GetResponseEvent $event) {
public function onRequest(RequestEvent $event) {
// Pass to the Html class that the current request is an Ajax request.
if ($event->getRequest()->request->get(static::AJAX_REQUEST_PARAMETER)) {
Html::setIsAjax(TRUE);
......@@ -53,10 +53,10 @@ public function onRequest(GetResponseEvent $event) {
/**
* Renders the ajax commands right before preparing the result.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The response event, which contains the possible AjaxResponse object.
*/
public function onResponse(FilterResponseEvent $event) {
public function onResponse(ResponseEvent $event) {
$response = $event->getResponse();
if ($response instanceof AjaxResponse) {
$this->ajaxResponseAttachmentsProcessor->processAttachments($response);
......
......@@ -5,7 +5,7 @@
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\CacheableResponseInterface;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -34,10 +34,10 @@ public function __construct(AccountInterface $current_user) {
/**
* Adds a cache tag if the 'user.permissions' cache context is present.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
if (!$event->isMasterRequest()) {
return;
}
......
......@@ -7,7 +7,7 @@
use Drupal\Core\Authentication\AuthenticationProviderInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\KernelEvents;
......@@ -65,12 +65,12 @@ public function __construct(AuthenticationProviderInterface $authentication_prov
/**
* Authenticates user on request.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The request event.
*
* @see \Drupal\Core\Authentication\AuthenticationProviderInterface::authenticate()
*/
public function onKernelRequestAuthenticate(GetResponseEvent $event) {
public function onKernelRequestAuthenticate(RequestEvent $event) {
if ($event->isMasterRequest()) {
$request = $event->getRequest();
if ($this->authenticationProvider->applies($request)) {
......@@ -86,10 +86,10 @@ public function onKernelRequestAuthenticate(GetResponseEvent $event) {
/**
* Denies access if authentication provider is not allowed on this route.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The request event.
*/
public function onKernelRequestFilterProvider(GetResponseEvent $event) {
public function onKernelRequestFilterProvider(RequestEvent $event) {
if (isset($this->filter) && $event->isMasterRequest()) {
$request = $event->getRequest();
if ($this->authenticationProvider->applies($request) && !$this->filter->appliesToRoutedRequest($request, TRUE)) {
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\CacheableResponseInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -16,10 +16,10 @@ class ClientErrorResponseSubscriber implements EventSubscriberInterface {
/**
* Sets the '4xx-response' cache tag on 4xx responses.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
if (!$event->isMasterRequest()) {
return;
}
......
......@@ -11,7 +11,7 @@
use Drupal\Core\Render\RendererInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -84,10 +84,10 @@ public function __construct(ArgumentResolverInterface $argument_resolver, Render
/**
* Ensures bubbleable metadata from early rendering is not lost.
*
* @param \Symfony\Component\HttpKernel\Event\FilterControllerEvent $event
* @param \Symfony\Component\HttpKernel\Event\ControllerEvent $event
* The controller event.
*/
public function onController(FilterControllerEvent $event) {
public function onController(ControllerEvent $event) {
$controller = $event->getController();
// See \Symfony\Component\HttpKernel\HttpKernel::handleRaw().
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Form\EnforcedResponse;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\KernelEvents;
......@@ -26,7 +26,7 @@ public function onKernelException(ExceptionEvent $event) {
/**
* Unwraps an enforced response.
*/
public function onKernelResponse(FilterResponseEvent $event) {
public function onKernelResponse(ResponseEvent $event) {
$response = $event->getResponse();
if ($response instanceof EnforcedResponse && $event->isMasterRequest()) {
$event->setResponse($response->getResponse());
......
......@@ -12,7 +12,7 @@
use Drupal\Core\Site\Settings;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -91,10 +91,10 @@ public function __construct(LanguageManagerInterface $language_manager, ConfigFa
/**
* Sets extra headers on any responses, also subrequest ones.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onAllResponds(FilterResponseEvent $event) {
public function onAllResponds(ResponseEvent $event) {
$response = $event->getResponse();
// Always add the 'http_response' cache tag to be able to invalidate every
// response, for example after rebuilding routes.
......@@ -106,10 +106,10 @@ public function onAllResponds(FilterResponseEvent $event) {
/**
* Sets extra headers on successful responses.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
if (!$event->isMasterRequest()) {
return;
}
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Render\HtmlResponse;
use Drupal\Core\Render\Placeholder\PlaceholderStrategyInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -39,10 +39,10 @@ public function __construct(PlaceholderStrategyInterface $placeholder_strategy)
/**
* Processes placeholders for HTML responses.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
$response = $event->getResponse();
if (!$response instanceof HtmlResponse) {
return;
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Render\HtmlResponse;
use Drupal\Core\Render\AttachmentsResponseProcessorInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -33,10 +33,10 @@ public function __construct(AttachmentsResponseProcessorInterface $html_response
/**
* Processes attachments for HtmlResponse responses.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
$response = $event->getResponse();
if (!$response instanceof HtmlResponse) {
return;
......
......@@ -5,7 +5,7 @@
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\HttpKernel\Event\TerminateEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -39,10 +39,10 @@ public function registerService($id) {
/**
* Invoked by the terminate kernel event.
*
* @param \Symfony\Component\HttpKernel\Event\PostResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\TerminateEvent $event
* The event object.
*/
public function onKernelTerminate(PostResponseEvent $event) {
public function onKernelTerminate(TerminateEvent $event) {
foreach ($this->services as $id) {
// Check if the service was initialized during this request, destruction
// is not necessary if the service was not used.
......
......@@ -7,7 +7,7 @@
use Drupal\Core\DependencyInjection\ClassResolverInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -72,10 +72,10 @@ public function __construct(ClassResolverInterface $class_resolver, RouteMatchIn
/**
* Sets a response given a (main content) render array.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event
* @param \Symfony\Component\HttpKernel\Event\ViewEvent $event
* The event to process.
*/
public function onViewRenderArray(GetResponseForControllerResultEvent $event) {
public function onViewRenderArray(ViewEvent $event) {
$request = $event->getRequest();
$result = $event->getControllerResult();
......
......@@ -14,7 +14,7 @@
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -97,10 +97,10 @@ public function __construct(MaintenanceModeInterface $maintenance_mode, ConfigFa
/**
* Returns the site maintenance page if the site is offline.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The event to process.
*/
public function onKernelRequestMaintenance(GetResponseEvent $event) {
public function onKernelRequestMaintenance(RequestEvent $event) {
$request = $event->getRequest();
$route_match = RouteMatch::createFromRequest($request);
if ($this->maintenanceMode->applies($route_match)) {
......
......@@ -5,7 +5,7 @@
use Symfony\Cmf\Component\Routing\RouteProviderInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Routing\Route;
......@@ -37,10 +37,10 @@ public function __construct(RouteProviderInterface $route_provider) {
/**
* Tries to handle the options request.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The request event.
*/
public function onRequest(GetResponseEvent $event) {
public function onRequest(RequestEvent $event) {
if ($event->getRequest()->isMethod('OPTIONS')) {
$routes = $this->routeProvider->getRouteCollectionForRequest($event->getRequest());
// In case we don't have any routes, a 403 should be thrown by the normal
......
......@@ -6,7 +6,7 @@
use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -34,10 +34,10 @@ public function __construct(HttpFoundationFactoryInterface $http_foundation_fact
/**
* Converts a PSR-7 response to a Symfony response.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event
* @param \Symfony\Component\HttpKernel\Event\ViewEvent $event
* The Event to process.
*/
public function onKernelView(GetResponseForControllerResultEvent $event) {
public function onKernelView(ViewEvent $event) {
$controller_result = $event->getControllerResult();
if ($controller_result instanceof ResponseInterface) {
......
......@@ -3,7 +3,7 @@
namespace Drupal\Core\EventSubscriber;
use Drupal\Core\Cache\CacheableRedirectResponse;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -15,10 +15,10 @@ class RedirectLeadingSlashesSubscriber implements EventSubscriberInterface {
/**
* Redirects paths starting with multiple slashes to a single slash.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* The GetResponseEvent to process.
* @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
* The RequestEvent to process.
*/
public function redirect(GetResponseEvent $event) {
public function redirect(RequestEvent $event) {
$request = $event->getRequest();
// Get the requested path minus the base path.
$path = $request->getPathInfo();
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Utility\UnroutedUrlAssemblerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -41,10 +41,10 @@ public function __construct(UnroutedUrlAssemblerInterface $url_assembler, Reques
/**
* Allows manipulation of the response object when performing a redirect.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The Event to process.
*/
public function checkRedirectUrl(FilterResponseEvent $event) {
public function checkRedirectUrl(ResponseEvent $event) {
$response = $event->getResponse();
if ($response instanceof RedirectResponse) {
$request = $event->getRequest();
......
......@@ -3,7 +3,7 @@
namespace Drupal\Core\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
use Symfony\Component\HttpKernel\KernelEvents;
......@@ -15,10 +15,10 @@ class RenderArrayNonHtmlSubscriber implements EventSubscriberInterface {
/**
* Throws an HTTP 406 error if client requested a non-HTML format.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event
* @param \Symfony\Component\HttpKernel\Event\ViewEvent $event
* The event to process.
*/
public function onRespond(GetResponseForControllerResultEvent $event) {
public function onRespond(ViewEvent $event) {
$request = $event->getRequest();
$result = $event->getControllerResult();
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Extension\ModuleHandlerInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\HttpKernel\Event\TerminateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
......@@ -35,10 +35,10 @@ public function __construct(ModuleHandlerInterface $module_handler) {
* removed/changed. Also, if possible, do more light-weight shutdowns on
* AJAX requests.
*
* @param Symfony\Component\HttpKernel\Event\PostResponseEvent $event
* @param Symfony\Component\HttpKernel\Event\TerminateEvent $event
* The Event to process.
*/
public function onTerminate(PostResponseEvent $event) {
public function onTerminate(TerminateEvent $event) {
$this->moduleHandler->writeCache();
}
......
......@@ -2,7 +2,7 @@
namespace Drupal\Core\EventSubscriber;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -14,10 +14,10 @@ class ResponseGeneratorSubscriber implements EventSubscriberInterface {
/**
* Sets extra X-Generator header on successful responses.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
if (!$event->isMasterRequest()) {
return;
}
......
......@@ -4,7 +4,7 @@
use Drupal\Core\Cache\CacheableResponseInterface;
use Drupal\Core\Routing\AccessAwareRouterInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -26,10 +26,10 @@ class RouteAccessResponseSubscriber implements EventSubscriberInterface {
/**
* Bubbles the route's access result' cacheability metadata.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The event to process.
*/
public function onRespond(FilterResponseEvent $event) {
public function onRespond(ResponseEvent $event) {
if (!$event->isMasterRequest()) {
return;
}
......
......@@ -5,7 +5,7 @@
use Drupal\Component\Utility\Html;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -16,10 +16,10 @@ class RssResponseRelativeUrlFilter implements EventSubscriberInterface {
/**
* Converts relative URLs to absolute URLs.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The response event.
*/
public function onResponse(FilterResponseEvent $event) {
public function onResponse(ResponseEvent $event) {
// Only care about RSS responses.
if (stripos($event->getResponse()->headers->get('Content-Type'), 'application/rss+xml') === FALSE) {
return;
......
......@@ -13,7 +13,7 @@
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
use Symfony\Component\HttpKernel\Event\ViewEvent;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\KernelEvents;
......@@ -57,10 +57,10 @@ public function __construct(FormAjaxResponseBuilderInterface $form_ajax_response
/**
* Alters the wrapper format if this is an AJAX form request.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent $event
* @param \Symfony\Component\HttpKernel\Event\ViewEvent $event
* The event to process.
*/
public function onView(GetResponseForControllerResultEvent $event) {
public function onView(ViewEvent $event) {
// To support an AJAX form submission of a form within a block, make the
// later VIEW subscribers process the controller result as though for
// HTML display (i.e., add blocks). During that block building, when the
......
......@@ -6,7 +6,7 @@
use Drupal\Core\CronInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;