Skip to content

Commit c71d936

Browse files
VincentLangletondrejmirtes
authored andcommitted
Fix
1 parent 2519289 commit c71d936

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Stubs/Doctrine/StubFilesExtensionLoader.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public function getFiles(): array
6161
$files[] = $stubsDir . '/ServiceEntityRepository.stub';
6262
}
6363

64-
$collectionVersion = InstalledVersions::getVersion('doctrine/dbal');
64+
$collectionVersion = class_exists(InstalledVersions::class)
65+
? InstalledVersions::getVersion('doctrine/collections')
66+
: null;
6567
if ($collectionVersion !== null && strpos($collectionVersion, '1.') === 0) {
6668
$files[] = $stubsDir . '/Collections/Collection1.stub';
6769
} else {

0 commit comments

Comments
 (0)