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

Commit

Permalink
Merge pull request #68 from symfony/console-fix
Browse files Browse the repository at this point in the history
fixed compatibility with Symfony 2.1/2.2
  • Loading branch information
stof committed Nov 12, 2013
2 parents 9c76b12 + 125e6d7 commit ee38221
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions EventListener/EmailSenderListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ public function onTerminate()

static public function getSubscribedEvents()
{
return array(
KernelEvents::TERMINATE => 'onTerminate',
ConsoleEvents::TERMINATE => 'onTerminate'
);
$listeners = array(KernelEvents::TERMINATE => 'onTerminate');

if (class_exists('Symfony\Component\Console\ConsoleEvents')) {
$listeners[ConsoleEvents::TERMINATE] = 'onTerminate';
}

return $listeners;
}
}

0 comments on commit ee38221

Please sign in to comment.