Skip to content

Commit

Permalink
fix compatibility with symfony 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
oallain committed Sep 7, 2023
1 parent ac21875 commit 6a6df1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/EventSubscriber/MaintenanceEventsubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ public function handle(RequestEvent $event): void
{
$configuration = $this->configurationFactory->get();

if (!$event->isMainRequest()) {
/** @phpstan-ignore-next-line */ /** Call to function method_exists() with RequestEvent and 'isMainRequest' will always evaluate to true. */
if (method_exists($event, 'isMainRequest') && !$event->isMainRequest()) {
return;
}

/** @TODO Drop after remove Symfony 4.4 compatibility */
if (method_exists($event, 'isMasterRequest') && !$event->isMasterRequest()) {
return;
}

Expand Down

0 comments on commit 6a6df1d

Please sign in to comment.