Symfony bug: ‘dependency on a non-existent service “swiftmailer.transport.real”‘

It seems there’s a bug in Symfony, when updating to Monolog Bundle 2.5.0 that causes this if you do not have the ‘spool’ config value set under the swiftmailer configuration.

I don’t know what to set in the spool config so that it doesn’t spool the emails, I don’t even know if this is possible at all. The way I do it is not set it.

However, now there’s this bug! Fortunately the way out is simple, we just have to add the services manually in one of our services files, as:


swiftmailer.transport.simplemailinvoker:
    class: Swift_Transport_SimpleMailInvoker

swiftmailer.transport.eventdispatcher:
    class: Swift_Events_SimpleEventDispatcher

swiftmailer.transport.real:
    class: Swift_Transport_MailTransport
    arguments: [@swiftmailer.transport.simplemailinvoker, @swiftmailer.transport.eventdispatcher]
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s