From 581a442887af845dbfe4aceed7d1cb08e538c532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 6 Jan 2020 11:23:04 +0100 Subject: [PATCH] Added EventSubscriberInterface marker interface to support autoconfiguration --- DependencyInjection/DoctrineExtension.php | 4 ++++ EventSubscriber/EventSubscriberInterface.php | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 EventSubscriber/EventSubscriberInterface.php 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 @@ +