Convert plugin to use Symfony events