Symfony 2.4 compatibility

Tested on Symfony 2.4 version.