Skip to content

Commit

Permalink
Remove EventSubscriberInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Dec 21, 2023
1 parent 3785d8d commit 511e354
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
4 changes: 0 additions & 4 deletions DependencyInjection/DoctrineMongoDBExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Doctrine\Bundle\MongoDBBundle\Command\LoadDataFixturesDoctrineODMCommand;
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\Mapping\Driver\XmlDriver;
use Doctrine\Bundle\MongoDBBundle\Repository\ServiceDocumentRepositoryInterface;
Expand Down Expand Up @@ -136,9 +135,6 @@ public function load(array $configs, ContainerBuilder $container): void
$container->registerForAutoconfiguration(ServiceDocumentRepositoryInterface::class)
->addTag(ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG);

$container->registerForAutoconfiguration(EventSubscriberInterface::class)
->addTag('doctrine_mongodb.odm.event_subscriber');

$container->registerAttributeForAutoconfiguration(AsDocumentListener::class, static function (ChildDefinition $definition, AsDocumentListener $attribute): void {
$definition->addTag('doctrine_mongodb.odm.event_listener', [
'event' => $attribute->event,
Expand Down
11 changes: 0 additions & 11 deletions EventSubscriber/EventSubscriberInterface.php

This file was deleted.

2 changes: 2 additions & 0 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ UPGRADE FROM 4.x to 5.0
`Doctrine\Bundle\MongoDBBundle\Cursor\TailableCursorProcessorInterface`
interface have been dropped. You should use
[change streams](https://docs.mongodb.com/manual/changeStreams/) instead.
* Remove `Doctrine\Bundle\MongoDBBundle\EventSubscriber\EventSubscriberInterface`.
Use the `#[AsDocumentListener]` attribute instead.
* The `setContainer`, `getContainer`, `getDoctrineDocumentManagers`,
`findBundle` and `findBasePathForBundle` methods from
`Doctrine\Bundle\MongoDBBundle\Command\DoctrineODMCommand` have been
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<directory name="Command"/>
<directory name="DataCollector"/>
<directory name="DependencyInjection"/>
<directory name="EventSubscriber"/>
<directory name="Fixture"/>
<directory name="Form"/>
<directory name="Loader"/>
Expand Down

0 comments on commit 511e354

Please sign in to comment.