Skip to content

Commit

Permalink
Merge pull request #17 from sjerdo/patch-1
Browse files Browse the repository at this point in the history
Support SW 6.5 in FlowLogSubscriber
  • Loading branch information
shyim authored Dec 24, 2024
2 parents d31694d + 6472ec5 commit 0dc4e2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Subscriber/FlowLogSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ public function sendFlowEvent(FlowLogEvent $event): void
$additionalData = $innerEvent->getLogData();
}

if ($logLevel->isLowerThan(Level::Warning)) {
// Fallback for Shopware 6.5 which returns an integer for LogAware::getLogLevel()
if (is_int($logLevel)) {

Check failure on line 37 in src/Subscriber/FlowLogSubscriber.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to function is_int() with Monolog\Level will always evaluate to false.

Check failure on line 37 in src/Subscriber/FlowLogSubscriber.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to function is_int() with Monolog\Level will always evaluate to false.
$logLevel = Level::tryFrom($logLevel);
}

if ($logLevel === null || $logLevel->isLowerThan(Level::Warning)) {

Check failure on line 41 in src/Subscriber/FlowLogSubscriber.php

View workflow job for this annotation

GitHub Actions / phpstan

Strict comparison using === between Monolog\Level and null will always evaluate to false.

Check failure on line 41 in src/Subscriber/FlowLogSubscriber.php

View workflow job for this annotation

GitHub Actions / phpstan

Strict comparison using === between Monolog\Level and null will always evaluate to false.
return;
}

Expand Down

0 comments on commit 0dc4e2e

Please # to comment.