Skip to content
Snippets Groups Projects
Commit 5b0ee54e authored by Yas Naoi's avatar Yas Naoi
Browse files

Issue #3229710 by yas: Change the deprecated class...

Issue #3229710 by yas: Change the deprecated class Symfony\Component\HttpKernel\Event\FilterResponseEvent to ResponseEvent
parent 840c1fd9
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
/**
......@@ -89,10 +89,10 @@ class AwsCloudSubscriber extends CloudServiceBase implements EventSubscriberInte
/**
* Display a warning message about EC2-Classic support on edit pages.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The response event.
*/
public function displayEc2ClassicMessage(FilterResponseEvent $event): void {
public function displayEc2ClassicMessage(ResponseEvent $event): void {
$route_names = [
'entity.cloud_server_template.launch',
'entity.cloud_server_template.add_form',
......@@ -137,10 +137,10 @@ class AwsCloudSubscriber extends CloudServiceBase implements EventSubscriberInte
/**
* Redirect to add form if entity is empty.
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The response event.
*/
public function redirectIfEmpty(FilterResponseEvent $event): void {
public function redirectIfEmpty(ResponseEvent $event): void {
$route_names = [
'entity.cloud_server_template.add_form',
];
......
......@@ -10,7 +10,7 @@ use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\KernelEvents;
......@@ -65,10 +65,10 @@ class CloudSubscriber extends CloudServiceBase implements EventSubscriberInterfa
/**
* Redirect if there is no cloud service provider (CloudConfig).
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The filter response event.
*/
public function redirectIfEmpty(FilterResponseEvent $event): void {
public function redirectIfEmpty(ResponseEvent $event): void {
$route_names = [
'view.cloud_config.list',
'view.cloud_config.design',
......@@ -138,10 +138,10 @@ class CloudSubscriber extends CloudServiceBase implements EventSubscriberInterfa
/**
* Redirect if there is no cloud service provider (CloudConfig).
*
* @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event
* @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event
* The filter response event.
*/
public function return404IfCloudContextNotExist(FilterResponseEvent $event): void {
public function return404IfCloudContextNotExist(ResponseEvent $event): void {
$cloud_context = $this->routeMatch->getParameter('cloud_context');
if (empty($cloud_context)) {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment