File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11# UPGRADE FROM 2.x to 3.0
22
3+ ## Composer
4+
5+ Composer version 1 is no longer supported. Please upgrade to Composer 2.
6+
37## Aggregation
48
59The new ` Doctrine\ODM\MongoDB\Aggregation\Builder::getAggregation() ` method
Original file line number Diff line number Diff line change 2626 "require" : {
2727 "php" : " ^8.1" ,
2828 "ext-mongodb" : " ^1.21 || ^2.0" ,
29+ "composer-runtime-api" : " ^2.0" ,
2930 "doctrine/cache" : " ^1.11 || ^2.0" ,
3031 "doctrine/collections" : " ^1.5 || ^2.0" ,
3132 "doctrine/event-manager" : " ^1.0 || ^2.0" ,
3233 "doctrine/instantiator" : " ^1.1 || ^2" ,
3334 "doctrine/persistence" : " ^3.2 || ^4" ,
3435 "friendsofphp/proxy-manager-lts" : " ^1.0" ,
35- "jean85/pretty-package-versions" : " ^1.3.0 || ^2.0.1" ,
3636 "mongodb/mongodb" : " ^1.21.2 || ^2.1.1" ,
3737 "psr/cache" : " ^1.0 || ^2.0 || ^3.0" ,
3838 "symfony/console" : " ^5.4 || ^6.0 || ^7.0" ,
Original file line number Diff line number Diff line change 44
55namespace Doctrine \ODM \MongoDB ;
66
7+ use Composer \InstalledVersions ;
78use Doctrine \Common \Annotations \AnnotationReader ;
89use Doctrine \Common \Cache \Cache ;
910use Doctrine \Common \Cache \Psr6 \CacheAdapter ;
2425use Doctrine \Persistence \Mapping \Driver \MappingDriver ;
2526use Doctrine \Persistence \ObjectRepository ;
2627use InvalidArgumentException ;
27- use Jean85 \PrettyVersions ;
2828use LogicException ;
2929use MongoDB \Client ;
3030use MongoDB \Driver \Manager ;
@@ -803,7 +803,7 @@ private static function getVersion(): string
803803 {
804804 if (! isset (self ::$ version )) {
805805 try {
806- self ::$ version = PrettyVersions:: getVersion ('doctrine/mongodb-odm ' )-> getPrettyVersion () ;
806+ return self ::$ version ??= InstalledVersions:: getPrettyVersion ('doctrine/mongodb-odm ' ) ?? ' unknown ' ;
807807 } catch (Throwable ) {
808808 return self ::$ version = 'unknown ' ;
809809 }
You can’t perform that action at this time.
0 commit comments