File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 14
14
use MongoDB \Driver \Exception \RuntimeException ;
15
15
use MongoDB \Driver \ReadPreference ;
16
16
use MongoDB \Laravel \Concerns \ManagesTransactions ;
17
+ use OutOfBoundsException ;
17
18
use Throwable ;
18
19
19
20
use function filter_var ;
@@ -324,7 +325,11 @@ private static function getVersion(): string
324
325
private static function lookupVersion (): string
325
326
{
326
327
try {
327
- return self ::$ version = InstalledVersions::getPrettyVersion ('mongodb/laravel-mongodb ' ) ?? 'unknown ' ;
328
+ try {
329
+ return self ::$ version = InstalledVersions::getPrettyVersion ('mongodb/laravel-mongodb ' ) ?? 'unknown ' ;
330
+ } catch (OutOfBoundsException ) {
331
+ return self ::$ version = InstalledVersions::getPrettyVersion ('jenssegers/mongodb ' ) ?? 'unknown ' ;
332
+ }
328
333
} catch (Throwable ) {
329
334
return self ::$ version = 'error ' ;
330
335
}
You can’t perform that action at this time.
0 commit comments