Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
[Swiftmailer] changed disable_strategy behavior
Browse files Browse the repository at this point in the history
The blackhole plugin that was used previously stop the propagation
of events, which means that the behavior can be slightly different
depending on the order of plugin registrations.

Instead, we now use the null transport to avoid this issue.
  • Loading branch information
fabpot committed Jun 15, 2011
1 parent 34d21df commit eacc82e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DependencyInjection/SwiftmailerExtension.php
Expand Up @@ -60,6 +60,10 @@ public function load(array $configs, ContainerBuilder $container)
$transport = $config['transport'];
}

if (isset($config['disable_delivery']) && $config['disable_delivery']) {
$transport = 'null';
}

if ('smtp' === $transport) {
$loader->load('smtp.xml');
}
Expand Down Expand Up @@ -117,10 +121,6 @@ public function load(array $configs, ContainerBuilder $container)
} else {
$container->setParameter('swiftmailer.single_address', null);
}

if (isset($config['disable_delivery']) && $config['disable_delivery']) {
$container->getDefinition('swiftmailer.plugin.blackhole')->addTag('swiftmailer.plugin');
}
}

/**
Expand Down

0 comments on commit eacc82e

Please sign in to comment.