Temporary fix to avoid deprecation notices in Symfony 2.2

This is a temporary fix to avoid those annoying deprecation notices in Symfony 2.2.