Skip to content

Commit

Permalink
Added EventSubscriberInterface marker interface to support autoconfig…
Browse files Browse the repository at this point in the history
…uration
  • Loading branch information
lyrixx committed Jan 8, 2020
1 parent 08f9447 commit 581a442
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DependencyInjection/DoctrineExtension.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
}

/**
Expand Down
9 changes: 9 additions & 0 deletions EventSubscriber/EventSubscriberInterface.php
@@ -0,0 +1,9 @@
<?php

namespace Doctrine\Bundle\DoctrineBundle\EventSubscriber;

use Doctrine\Common\EventSubscriber;

interface EventSubscriberInterface extends EventSubscriber
{
}

0 comments on commit 581a442

Please sign in to comment.