Skip to content

Commit

Permalink
Fix event listeners for Symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Dec 9, 2023
1 parent e9be624 commit f7fe4a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/EventListener/BlameListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(BlameableListener $blameableListener, TokenStorageIn
*/
public function onKernelRequest(RequestEvent $event)
{
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
if (!$event->isMainRequest()) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/IpTraceListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(IpTraceableListener $ipTraceableListener)

public function onKernelRequest(RequestEvent $event)
{
if (HttpKernelInterface::MAIN_REQUEST !== $event->getRequestType()) {
if (!$event->isMainRequest()) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/LoggerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(LoggableListener $loggableListener, TokenStorageInte
*/
public function onKernelRequest(RequestEvent $event)
{
if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
if (!$event->isMainRequest()) {
return;
}

Expand Down

0 comments on commit f7fe4a2

Please sign in to comment.