DI: drop unused EventDisptacher collecting

This commit is contained in:
TomasVotruba 2017-09-07 15:36:54 +02:00
parent f3adbc4990
commit f482f2760c

View File

@ -8,8 +8,6 @@ use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symplify\PackageBuilder\Adapter\Symfony\DependencyInjection\DefinitionCollector;
final class CollectorCompilerPass implements CompilerPassInterface
@ -18,7 +16,6 @@ final class CollectorCompilerPass implements CompilerPassInterface
{
$this->collectCommandsToConsoleApplication($containerBuilder);
$this->collectRectorsToRectorCollector($containerBuilder);
$this->collectEventSubscribersToEventDisptacher($containerBuilder);
}
private function collectCommandsToConsoleApplication(ContainerBuilder $containerBuilder): void
@ -40,14 +37,4 @@ final class CollectorCompilerPass implements CompilerPassInterface
'addRector'
);
}
private function collectEventSubscribersToEventDisptacher(ContainerBuilder $containerBuilder): void
{
DefinitionCollector::loadCollectorWithType(
$containerBuilder,
EventDispatcherInterface::class,
EventSubscriberInterface::class,
'addSubscriber'
);
}
}