[Form] Enhanced the form error message
[Form] Enhanced the form error message

The error message on type mismatch is a bit obscure:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.

This commit changes it to:

The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of Samson\Bundle\TRSBundle\Entity\Labour.

symfony/Form