June 23, 2017 | 3 Comments | Programming | PHP Symfony2

Symfony Logout Handler

Suppose we  want log some activities when user logout on website. So let’s take a look on Symfony Logout Handler which is built in in Securiy Bundle.

August 17, 2016 | No Comments | Programming | PHP Symfony2

Top 10 Symfony2 Bundles

Symfony2 is a great tool for rapid development. And I want to present Top 10 Symfony2 Bundles which will save you huge amount of time in your development practice. Your clients will be amazed at how quickly and easily you develop new functionality. So let’s start:

August 16, 2016 | No Comments | Programming | Behat PHP Symfony2 Testing

How to Setup Behat Mink and Selenium for Symfony2

Symfony has a great toolset for functional testing. It’s useful in small projects but in big ones we need to use TDD or BDD techniques with big amount of tests. Suppose we need to integrate tools for testing with our project. Let’s review it on example with BDD toolset Behat Mink and Selenium for Symfony2.

June 14, 2016 | No Comments | Programming | doctrine listener Symfony2

Using Doctrine Entity Listeners in Symfony2

Since doctrine 2.4 we can use Entity Listeners to perform operations before/after saving entity in database.  How to use entity listeners in Symfony2 ?  For example we need to log our entity on some condition.

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.

April 18, 2016 | No Comments | Programming | FOSUserBundle PHP Symfony2

Custom Email Provider in FOSUserBundle

In this article I will show you a example of custom user provider in FOSUserBundle.

Let us imagine that we want to authenticate user only by email. In the latest version of this bundle you can authenticate user by username or by username || email combination. Code is pretty simple. You need only inject custom user provider.

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.

November 23, 2015 | No Comments | Programming | PHP Routing Loader Service Symfony2

Custom Route Loader in Symfony 2

Sometimes we want to load different routing file depends on user data or environment variables. Symfony has article in cookbook which explains such functionality but I can share with you how to create Custom Route Loader in Symfony2 with some nuances/pitfalls and working example.

oauth

November 17, 2015 | 2 Comments | Programming | Bundle HWIOauth Security Social Symfony2 Vkontakte

How to use Symfony2 HWIOAuth Bundle with Vkontakte

In this article I want to introduce to you HWIOAuth Bundle which will help us to create sign in with social network credentials on Symfony2.