Skip to content

Commit

Permalink
Update src/Components/Health/Checker/PerformanceChecker/MessengerAuto…
Browse files Browse the repository at this point in the history
…SetupChecker.php

Co-authored-by: Felix Schneider <[email protected]>
  • Loading branch information
M-arcus and schneider-felix authored Dec 9, 2024
1 parent 0e10f61 commit 512f46e
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ public function collect(HealthCollection $collection): void

private function isAutoSetupEnabled(string $messageTransportDsn): bool
{
$params = \parse_url($messageTransportDsn);
$queryParams = \parse_url($messageTransportDsn, \PHP_URL_QUERY);

// Messenger DSN is invalid. Therefore we can't really check
if ($params === false) {

Check failure on line 43 in src/Components/Health/Checker/PerformanceChecker/MessengerAutoSetupChecker.php

View workflow job for this annotation

GitHub Actions / phpstan / Static Analyse

Undefined variable: $params
return false;
}

if ($params === null){
return true;
}

$query = [];
if (isset($params['query'])) {
\parse_str($params['query'], $query);
}
\parse_str($queryParams, $query);

Check failure on line 52 in src/Components/Health/Checker/PerformanceChecker/MessengerAutoSetupChecker.php

View workflow job for this annotation

GitHub Actions / phpstan / Static Analyse

Parameter #1 $string of function parse_str expects string, string|false|null given.

$query += ['auto_setup' => true];

Expand Down

0 comments on commit 512f46e

Please sign in to comment.