Skip to content

Commit

Permalink
Apply RegisterListenersPass before service removal
Browse files Browse the repository at this point in the history
  • Loading branch information
guvra committed Feb 13, 2024
1 parent ce39002 commit 7f2cbf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Smile\GdprDump\DependencyInjection\Compiler\ConverterAliasPass;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
Expand Down Expand Up @@ -108,7 +109,7 @@ private function buildContainer(): ContainerInterface
$loader = new YamlFileLoader($container, new FileLocator($basePath . '/app/config'));
$loader->load('services.yaml');

$container->addCompilerPass(new RegisterListenersPass());
$container->addCompilerPass(new RegisterListenersPass(), PassConfig::TYPE_BEFORE_REMOVING);
$container->addCompilerPass(new ConverterAliasPass());

$container->setParameter('app_root', $basePath);
Expand Down

0 comments on commit 7f2cbf7

Please sign in to comment.