mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 16:30:51 +00:00
DI: drop unused EventDisptacher collecting
This commit is contained in:
parent
f3adbc4990
commit
f482f2760c
|
@ -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'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user