June 3, 2016 | No Comments | Programming | event listener monolog pushover Symfony2

Custom Exception Listener in Symfony2

The common task in web development is handling and monitoring exception with various tools. In this article I can show how to handle and log errors in Symfony2.  For this task we will use our custom exception listener.

For example, we have Pushover Handler in Monolog library and we want to receive push notification about every exception except 404 errors.

January 28, 2016 | 1 Comment | Programming | event listener PHP Symfony2

Custom Events And Event Listeners in Symfony2

All we know that fat controllers is evil in MVC but where we can place additional logic ? One of the solutions in Symfony2 – events and event listeners provided by EventDispatcher Component.