-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.3.3][swiftMailer] Argument 2 passed to Swift_Transport_SendmailTransport::__construct() must implement interface Swift_Events_EventDispatcher #8700
Comments
Same error for me :-( |
Me too. |
One more here, but only on production server. Devel and staging working ok. |
hello ! |
I got same error. For now, downgrade swiftmailer resolves problem... |
it works on 2.3.2....thank you ! Should i closed this issue ? |
indeed ! it's works ! thx |
I've investigated the issue a bit. The source of the problem is that the transport constructor is called with 3 parameters.
The first parameters is created and added twice during dependencies injection. Anyway, I've backtracked what triggers the two instances with the possible patches.
diff --git a/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/config/swiftmailer.xml b/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/config/swiftmailer.xml
index 6093542..c5d2037 100644
--- a/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/config/swiftmailer.xml
+++ b/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/Resources/config/swiftmailer.xml
@@ -36,11 +36,9 @@
</service>
<service id="swiftmailer.transport.sendmail.abstract" class="%swiftmailer.transport.sendmail.class%" abstract="true" public="false">
- <argument type="service" id="swiftmailer.transport.buffer" />
</service>
<service id="swiftmailer.transport.mail.abstract" class="%swiftmailer.transport.mail.class%" abstract="true" public="false">
- <argument type="service" id="swiftmailer.transport.mailinvoker" />
</service>
<service id="swiftmailer.transport.null.abstract" class="Swift_Transport_NullTransport" abstract="true" public="false">
diff --git a/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/DependencyInjection/SwiftmailerExtension.php b/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/DependencyInjection/SwiftmailerExtension.php
index c8d24b6..5502bce 100644
--- a/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/DependencyInjection/SwiftmailerExtension.php
+++ b/vendor/symfony/swiftmailer-bundle/Symfony/Bundle/SwiftmailerBundle/DependencyInjection/SwiftmailerExtension.php
@@ -139,7 +139,6 @@ class SwiftmailerExtension extends Extension
$container
->setDefinition(sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport), $definitionDecorator)
->setArguments(array(
- new Reference('swiftmailer.transport.buffer'),
new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)),
))
;
@@ -149,7 +148,6 @@ class SwiftmailerExtension extends Extension
$container
->setDefinition(sprintf('swiftmailer.mailer.%s.transport.%s', $name, $transport), $definitionDecorator)
->setArguments(array(
- new Reference('swiftmailer.transport.mailinvoker'),
new Reference(sprintf('swiftmailer.mailer.%s.transport.eventdispatcher', $name)),
))
; I've tested both solutions and they work for me. Maybe this are just workaround, but hope this will help. |
I got same error. But only downgrade to swiftmailer 2.3.1 resolves problem... |
Same problem, downgrading to swiftmailer-bundle 2.3.2 resolves the issue. Ping @fabpot |
fixed now |
version of swfitmailer work on 2.3.2, but don't on 2.3.3
|
+1 |
1 similar comment
+1 |
hi
on sf2.3.3, i try today to send email as i do on sf2.1, and got this message, se below:
in my composer.json got this
the command in cli
The text was updated successfully, but these errors were encountered: