Skip to content

Commit 6da1a65

Browse files
Fix
1 parent cb1c2df commit 6da1a65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Stubs/Doctrine/StubFilesExtensionLoader.php

Lines changed: 3 additions & 1 deletion
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)