Permalink
Browse files

[Swiftmailer] changed disable_strategy behavior

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...
1 parent 34d21df commit eacc82e84b5fd19b25ce0b61143d94824e8c6c45 @fabpot fabpot committed Jun 15, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 DependencyInjection/SwiftmailerExtension.php
@@ -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');
}
@@ -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');
- }
}
/**

0 comments on commit eacc82e

Please sign in to comment.