Replacing deprecated method call in Form Type class