Skip to content

Commit

Permalink
fix(symfony): fetch api-platform/symfony version debug bar
Browse files Browse the repository at this point in the history
fixes #6709
  • Loading branch information
soyuka committed Oct 15, 2024
1 parent 99262dc commit c6e08c2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Symfony/Bundle/DataCollector/RequestDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ public function getVersion(): ?string
return null;
}

$version = Versions::getVersion('api-platform/core');
try {
$version = Versions::getVersion('api-platform/symfony');
} catch (\OutOfBoundsException $e) {
try {
$version = Versions::getVersion('api-platform/core');
} catch (\OutOfBoundsException $e) {
return null;
}
}

preg_match('/^v(.*?)@/', (string) $version, $output);

return $output[1] ?? strtok($version, '@');
Expand Down

0 comments on commit c6e08c2

Please sign in to comment.