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 1414 "ext-hash" : " *" ,
1515 "ext-json" : " *" ,
1616 "ext-mongodb" : " ^1.18.0" ,
17- "jean85/pretty-package-versions " : " ^2.0.1 " ,
17+ "composer-runtime-api " : " ^2.0" ,
1818 "psr/log" : " ^1.1.4|^2|^3" ,
1919 "symfony/polyfill-php80" : " ^1.27" ,
2020 "symfony/polyfill-php81" : " ^1.27"
Original file line number Diff line number Diff line change 1717
1818namespace MongoDB ;
1919
20+ use Composer \InstalledVersions ;
2021use Iterator ;
21- use Jean85 \PrettyVersions ;
2222use MongoDB \Driver \ClientEncryption ;
2323use MongoDB \Driver \Exception \InvalidArgumentException as DriverInvalidArgumentException ;
2424use MongoDB \Driver \Exception \RuntimeException as DriverRuntimeException ;
@@ -396,9 +396,9 @@ private static function getVersion(): string
396396 {
397397 if (self ::$ version === null ) {
398398 try {
399- self ::$ version = PrettyVersions:: getVersion ('mongodb/mongodb ' )-> getPrettyVersion () ;
399+ self ::$ version = InstalledVersions:: getPrettyVersion ('mongodb/mongodb ' ) ?? ' unknown ' ;
400400 } catch (Throwable $ t ) {
401- return ' unknown ' ;
401+ self :: $ version = ' error ' ;
402402 }
403403 }
404404
You can’t perform that action at this time.
0 commit comments