adapted form building to new symfony version