Skip to content

Commit

Permalink
Remove deprecated alias
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Dec 13, 2023
1 parent 573531e commit 62b1ab9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
7 changes: 0 additions & 7 deletions DependencyInjection/DoctrineMongoDBExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,6 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa
$methods['setPersistentCollectionFactory'] = new Reference($documentManager['persistent_collection_factory']);
}

$container->getAlias('doctrine_mongodb.odm.command_logger')
->setDeprecated(
'doctrine/mongodb-odm-bundle',
'4.4',
'The service %alias_id% is deprecated and will be dropped in DoctrineMongoDBBundle 5.0. Use "doctrine_mongodb.odm.psr_command_logger" instead.',
);

// logging
if ($container->getParameterBag()->resolveValue($documentManager['logging'])) {
$container->getDefinition('doctrine_mongodb.odm.psr_command_logger')
Expand Down
4 changes: 1 addition & 3 deletions Resources/config/logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@
->tag('monolog.logger', ['channel' => 'doctrine'])
->args([
service('logger')->nullOnInvalid(),
])

->alias('doctrine_mongodb.odm.command_logger', 'doctrine_mongodb.odm.psr_command_logger');
]);
};
3 changes: 0 additions & 3 deletions Tests/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ public function testDataCollectorConfig(bool $expected, array $config, bool $deb
$this->container->setParameter('kernel.debug', $debug);
$this->extension->load([$config], $this->container);

$deprecatedLoggerDefinition = $this->container->getAlias('doctrine_mongodb.odm.command_logger');
$this->assertTrue($deprecatedLoggerDefinition->isDeprecated());

$loggerDefinition = $this->container->getDefinition('doctrine_mongodb.odm.data_collector.command_logger');
$this->assertSame($expected, $loggerDefinition->hasTag('doctrine_mongodb.odm.command_logger'));

Expand Down

0 comments on commit 62b1ab9

Please sign in to comment.