Don't depend on deprecated code from Symfony

Refs #703.