Use the symfony ExpressionLanguage component