Skip to content

Commit

Permalink
Merge pull request #1119 from lyrixx/autoconfigure
Browse files Browse the repository at this point in the history
Added EventSubscriberInterface marker interface to support autoconfiguration
  • Loading branch information
alcaeus committed Jan 9, 2020
2 parents 4e60cd9 + 581a442 commit 54b64c9
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\ORM\UnitOfWork;
use LogicException;
Expand Down Expand Up @@ -386,6 +387,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 54b64c9

Please sign in to comment.