Skip to content

Commit

Permalink
Remove unneeded parameter values
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 14, 2023
1 parent 2b87ebe commit 7530f80
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions DependencyInjection/DoctrineMongoDBExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,21 @@

use Doctrine\Bundle\MongoDBBundle\Attribute\AsDocumentListener;
use Doctrine\Bundle\MongoDBBundle\Attribute\MapDocument;
use Doctrine\Bundle\MongoDBBundle\CacheWarmer\HydratorCacheWarmer;
use Doctrine\Bundle\MongoDBBundle\CacheWarmer\PersistentCollectionCacheWarmer;
use Doctrine\Bundle\MongoDBBundle\CacheWarmer\ProxyCacheWarmer;
use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\FixturesCompilerPass;
use Doctrine\Bundle\MongoDBBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass;
use Doctrine\Bundle\MongoDBBundle\EventSubscriber\EventSubscriberInterface;
use Doctrine\Bundle\MongoDBBundle\Fixture\ODMFixtureInterface;
use Doctrine\Bundle\MongoDBBundle\ManagerConfigurator;
use Doctrine\Bundle\MongoDBBundle\ManagerRegistry;
use Doctrine\Bundle\MongoDBBundle\Repository\ServiceDocumentRepositoryInterface;
use Doctrine\Common\Cache\MemcacheCache;
use Doctrine\Common\Cache\RedisCache;
use Doctrine\Common\DataFixtures\Loader as DataFixturesLoader;
use Doctrine\Common\EventSubscriber;
use Doctrine\ODM\MongoDB\Configuration as MongoDBConfiguration;
use Doctrine\ODM\MongoDB\DocumentManager;
use InvalidArgumentException;
use Jean85\PrettyVersions;
use MongoDB\Client;
use Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver;
use Symfony\Bridge\Doctrine\ContainerAwareEventManager;
use Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension;
use Symfony\Bridge\Doctrine\Messenger\DoctrineClearEntityManagerWorkerSubscriber;
use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntityValidator;
use Symfony\Bridge\Doctrine\Validator\DoctrineInitializer;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
Expand Down Expand Up @@ -684,24 +673,20 @@ private function deprecateClassParameters(ContainerBuilder $container): void

foreach (
[
'doctrine_mongodb.odm.connection.class' => Client::class,
'doctrine_mongodb.odm.configuration.class' => MongoDBConfiguration::class,
'doctrine_mongodb.odm.document_manager.class' => DocumentManager::class,
'doctrine_mongodb.odm.manager_configurator.class' => ManagerConfigurator::class,
'doctrine_mongodb.odm.event_manager.class' => ContainerAwareEventManager::class,
'doctrine_odm.mongodb.validator_initializer.class' => DoctrineInitializer::class,
'doctrine_odm.mongodb.validator.unique.class' => UniqueEntityValidator::class,
'doctrine_mongodb.odm.class' => ManagerRegistry::class,
'doctrine_mongodb.odm.security.user.provider.class' => EntityUserProvider::class,
'doctrine_mongodb.odm.proxy_cache_warmer.class' => ProxyCacheWarmer::class,
'doctrine_mongodb.odm.hydrator_cache_warmer.class' => HydratorCacheWarmer::class,
'doctrine_mongodb.odm.persistent_collection_cache_warmer.class' => PersistentCollectionCacheWarmer::class,
] as $parameter => $class
'doctrine_mongodb.odm.connection.class',
'doctrine_mongodb.odm.configuration.class',
'doctrine_mongodb.odm.document_manager.class',
'doctrine_mongodb.odm.manager_configurator.class',
'doctrine_mongodb.odm.event_manager.class',
'doctrine_odm.mongodb.validator_initializer.class',
'doctrine_odm.mongodb.validator.unique.class',
'doctrine_mongodb.odm.class',
'doctrine_mongodb.odm.security.user.provider.class',
'doctrine_mongodb.odm.proxy_cache_warmer.class',
'doctrine_mongodb.odm.hydrator_cache_warmer.class',
'doctrine_mongodb.odm.persistent_collection_cache_warmer.class',
] as $parameter
) {
if (! $container->hasParameter($parameter) || $container->getParameter($parameter) === $class) {
continue;
}

$container->deprecateParameter(
$parameter,
'doctrine/mongodb-odm-bundle',
Expand Down

0 comments on commit 7530f80

Please sign in to comment.