Skip to content

Commit

Permalink
Added ServiceEventSubscriber marker interface to support autoconfigur…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
lyrixx committed Jan 6, 2020
1 parent 08f9447 commit ef9a99e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Doctrine\Bundle\DoctrineBundle\Dbal\RegexSchemaAssetFilter;
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass;
use Doctrine\Bundle\DoctrineBundle\EventSubscriber\ServiceEventSubscriber;
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(ServiceEventSubscriber::class)
->addTag('doctrine.event_subscriber');
}

/**
Expand Down
7 changes: 7 additions & 0 deletions EventSubscriber/ServiceEventSubscriber.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Doctrine\Bundle\DoctrineBundle\EventSubscriber;

interface ServiceEventSubscriber
{
}

0 comments on commit ef9a99e

Please sign in to comment.