Skip to content

Commit a945940

Browse files
committed
fix(symfony): fetch api-platform/symfony version debug bar
fixes #6709
1 parent 99262dc commit a945940

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Symfony/Bundle/DataCollector/RequestDataCollector.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,16 @@ public function getVersion(): ?string
7373
return null;
7474
}
7575

76-
$version = Versions::getVersion('api-platform/core');
76+
try {
77+
$version = Versions::getVersion('api-platform/core');
78+
} catch (\OutOfBoundsException $e) {
79+
try {
80+
$version = Versions::getVersion('api-platform/symfony');
81+
} catch (\OutOfBoundsException $e) {
82+
return null;
83+
}
84+
}
85+
7786
preg_match('/^v(.*?)@/', (string) $version, $output);
7887

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

0 commit comments

Comments
 (0)