Commit 28ca6fec authored by Fabien Potencier's avatar Fabien Potencier

minor #1242 Remove event type hint as ConsoleEvents are not ResponseEvents (Seldaek)

This PR was merged into the 2.0.x-dev branch.

Discussion
----------

Remove event type hint as ConsoleEvents are not ResponseEvents

Commits
-------

f409df8f Remove event type hint as ConsoleEvents are not ResponseEvents
parents 2183542a f409df8f
......@@ -99,7 +99,8 @@ class SwiftmailerServiceProvider implements ServiceProviderInterface, EventListe
public function subscribe(Container $app, EventDispatcherInterface $dispatcher)
{
$onTerminate = function (PostResponseEvent $event) use ($app) {
// Event has no typehint as it can be either a PostResponseEvent or a ConsoleTerminateEvent
$onTerminate = function ($event) use ($app) {
// To speed things up (by avoiding Swift Mailer initialization), flush
// messages only if our mailer has been created (potentially used)
if ($app['mailer.initialized']) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment