Skip to content

Commit

Permalink
Merge pull request #467 from stof/fix_event_listeners
Browse files Browse the repository at this point in the history
Fix event listeners for Symfony 7
  • Loading branch information
stof authored Dec 9, 2023
2 parents e9be624 + f7fe4a2 commit 299d533
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 299d533

Please sign in to comment.