Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored and ondrejmirtes committed Apr 17, 2024
1 parent 2519289 commit c71d936
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Stubs/Doctrine/StubFilesExtensionLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public function getFiles(): array
$files[] = $stubsDir . '/ServiceEntityRepository.stub';
}

$collectionVersion = InstalledVersions::getVersion('doctrine/dbal');
$collectionVersion = class_exists(InstalledVersions::class)
? InstalledVersions::getVersion('doctrine/collections')
: null;
if ($collectionVersion !== null && strpos($collectionVersion, '1.') === 0) {
$files[] = $stubsDir . '/Collections/Collection1.stub';
} else {
Expand Down

0 comments on commit c71d936

Please sign in to comment.