diff --git a/DependencyInjection/DoctrineExtension.php b/DependencyInjection/DoctrineExtension.php index 485aaba47..199f9f65a 100644 --- a/DependencyInjection/DoctrineExtension.php +++ b/DependencyInjection/DoctrineExtension.php @@ -4,6 +4,7 @@ use Doctrine\Bundle\DoctrineBundle\Dbal\RegexSchemaAssetFilter; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass; +use Doctrine\Bundle\DoctrineBundle\EventSubscriber\EventSubscriberInterface; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepositoryInterface; use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\CacheProviderLoader; use Doctrine\Bundle\DoctrineCacheBundle\DependencyInjection\SymfonyBridgeAdapter; @@ -413,6 +414,9 @@ protected function ormLoad(array $config, ContainerBuilder $container) $container->registerForAutoconfiguration(ServiceEntityRepositoryInterface::class) ->addTag(ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG); + + $container->registerForAutoconfiguration(EventSubscriberInterface::class) + ->addTag('doctrine.event_subscriber'); } /** diff --git a/EventSubscriber/EventSubscriberInterface.php b/EventSubscriber/EventSubscriberInterface.php new file mode 100644 index 000000000..34cede2bb --- /dev/null +++ b/EventSubscriber/EventSubscriberInterface.php @@ -0,0 +1,9 @@ +