File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 14
14
"ext-hash" : " *" ,
15
15
"ext-json" : " *" ,
16
16
"ext-mongodb" : " ^1.18.0" ,
17
- "jean85/pretty-package-versions " : " ^2.0.1 " ,
17
+ "composer-runtime-api " : " ^2.0" ,
18
18
"psr/log" : " ^1.1.4|^2|^3" ,
19
19
"symfony/polyfill-php80" : " ^1.27" ,
20
20
"symfony/polyfill-php81" : " ^1.27"
Original file line number Diff line number Diff line change 17
17
18
18
namespace MongoDB ;
19
19
20
+ use Composer \InstalledVersions ;
20
21
use Iterator ;
21
- use Jean85 \PrettyVersions ;
22
22
use MongoDB \Driver \ClientEncryption ;
23
23
use MongoDB \Driver \Exception \InvalidArgumentException as DriverInvalidArgumentException ;
24
24
use MongoDB \Driver \Exception \RuntimeException as DriverRuntimeException ;
@@ -396,9 +396,9 @@ private static function getVersion(): string
396
396
{
397
397
if (self ::$ version === null ) {
398
398
try {
399
- self ::$ version = PrettyVersions:: getVersion ('mongodb/mongodb ' )-> getPrettyVersion () ;
399
+ self ::$ version = InstalledVersions:: getPrettyVersion ('mongodb/mongodb ' ) ?? ' unknown ' ;
400
400
} catch (Throwable $ t ) {
401
- return ' unknown ' ;
401
+ self :: $ version = ' error ' ;
402
402
}
403
403
}
404
404
You can’t perform that action at this time.
0 commit comments