1.0 branch is still compatible with symfony 2.1, need to use the deprecated setPattern method