Skip to content

Commit

Permalink
Merge pull request #805 from GromNaN/composer-version
Browse files Browse the repository at this point in the history
Remove dependency to `jean85/pretty-package-versions`
  • Loading branch information
malarzm authored Dec 12, 2023
2 parents e893030 + 3a9b9d3 commit cfeb317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DependencyInjection/DoctrineMongoDBExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Doctrine\Bundle\MongoDBBundle\DependencyInjection;

use Composer\InstalledVersions;
use Doctrine\Bundle\MongoDBBundle\Attribute\AsDocumentListener;
use Doctrine\Bundle\MongoDBBundle\Attribute\MapDocument;
use Doctrine\Bundle\MongoDBBundle\Command\LoadDataFixturesDoctrineODMCommand;
Expand All @@ -18,7 +19,6 @@
use Doctrine\Common\EventSubscriber;
use Doctrine\ODM\MongoDB\DocumentManager;
use InvalidArgumentException;
use Jean85\PrettyVersions;
use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver;
use Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension;
use Symfony\Bridge\Doctrine\Messenger\DoctrineClearEntityManagerWorkerSubscriber;
Expand Down Expand Up @@ -653,7 +653,7 @@ private static function getODMVersion(): string
{
if (self::$odmVersion === null) {
try {
self::$odmVersion = PrettyVersions::getVersion('doctrine/mongodb-odm')->getPrettyVersion();
self::$odmVersion = InstalledVersions::getPrettyVersion('doctrine/mongodb-odm') ?? 'no version';
} catch (Throwable) {
return 'unknown';
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"require": {
"php": "^8.1",
"ext-mongodb": "^1.5",
"composer-runtime-api": "^2.0",
"doctrine/mongodb-odm": "^2.3",
"doctrine/persistence": "^2.2 || ^3.0",
"jean85/pretty-package-versions": "^1.3.0 || ^2.0.1",
"psr/log": "^1.0 || ^2.0 || ^3.0",
"symfony/config": "^5.4 || ^6.2",
"symfony/console": "^5.4 || ^6.2",
Expand Down

0 comments on commit cfeb317

Please sign in to comment.