Made it compatible with symfony 2.3