made compatible with symfony 2.0