We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6da1a65 commit 4193c2aCopy full SHA for 4193c2a
src/Stubs/Doctrine/StubFilesExtensionLoader.php
@@ -61,9 +61,13 @@ public function getFiles(): array
61
$files[] = $stubsDir . '/ServiceEntityRepository.stub';
62
}
63
64
- $collectionVersion = class_exists(InstalledVersions::class)
65
- ? InstalledVersions::getVersion('doctrine/collections')
66
- : null;
+ try {
+ $collectionVersion = class_exists(InstalledVersions::class)
+ ? InstalledVersions::getVersion('doctrine/collections')
67
+ : null;
68
+ } catch (\OutOfBoundsException $e) {
69
+ $collectionVersion = null;
70
+ }
71
if ($collectionVersion !== null && strpos($collectionVersion, '1.') === 0) {
72
$files[] = $stubsDir . '/Collections/Collection1.stub';
73
} else {
0 commit comments