Added condition to support Symfony 2.0, 2.1 & 2.2