From 2fdeeb5100b3207b4a5d1f4e99c5463426211a22 Mon Sep 17 00:00:00 2001 From: Olivier Date: Fri, 27 Nov 2020 17:18:09 +0100 Subject: [PATCH] remove deprecated notice in doctrine/mongodb-odm 1.1 --- composer.json | 2 +- src/Provider/DoctrineMongoDbOdmProvider.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 34aaea8..c3e76d5 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": "~7.0|~5.6", "alcaeus/mongo-php-adapter": "^1.1.3", - "doctrine/mongodb-odm": "~1.0", + "doctrine/mongodb-odm": "~1.3", "pimple/pimple": ">=2.1,<4", "saxulum/saxulum-doctrine-mongodb-provider": "~2.0" }, diff --git a/src/Provider/DoctrineMongoDbOdmProvider.php b/src/Provider/DoctrineMongoDbOdmProvider.php index d07de30..be63ee2 100644 --- a/src/Provider/DoctrineMongoDbOdmProvider.php +++ b/src/Provider/DoctrineMongoDbOdmProvider.php @@ -128,7 +128,7 @@ public function register(Container $container) $config->setAutoGenerateHydratorClasses($container['mongodbodm.auto_generate_hydrators']); $config->setClassMetadataFactoryName($container['mongodbodm.class_metadata_factory_name']); - $config->setDefaultRepositoryClassName($container['mongodbodm.default_repository_class']); + $config->setDefaultDocumentRepositoryClassName($container['mongodbodm.default_repository_class']); $config->setRepositoryFactory($container['mongodbodm.repository_factory']); @@ -443,7 +443,7 @@ protected function getMongodbOdmDefaults(Container $container) 'mongodbodm.hydrator_namespace' => 'DoctrineHydrator', 'mongodbodm.auto_generate_hydrators' => true, 'mongodbodm.class_metadata_factory_name' => 'Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory', - 'mongodbodm.default_repository_class' => 'Doctrine\ODM\MongoDB\DocumentRepository', + 'mongodbodm.default_repository_class' => 'Doctrine\ODM\MongoDB\Repository\DocumentRepository', ]; } }