Skip to content

Commit

Permalink
Load the compiler pass
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Oct 7, 2024
1 parent e202420 commit 238d2a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/SetonoSyliusMailerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

namespace Setono\SyliusMailerPlugin;

use Setono\SyliusMailerPlugin\DependencyInjection\Compiler\RegisterSwiftMailerListenerPass;
use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait;
use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;

final class SetonoSyliusMailerPlugin extends AbstractResourceBundle
{
Expand All @@ -18,4 +20,11 @@ public function getSupportedDrivers(): array
SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
];
}

public function build(ContainerBuilder $container): void
{
parent::build($container);

$container->addCompilerPass(new RegisterSwiftMailerListenerPass());
}
}

0 comments on commit 238d2a3

Please sign in to comment.