Use the Symfony2 event dispatcher.