Bläddra i källkod
merged branch Burgov/add_error_on_wrong_type (PR #2859)
Commits
-------
d97d7e9 Added a check to see if the type is a string if it's not a FormTypeInterface
Discussion
----------
Add exception on wrong type
When you forget to extend AbstractType in your form type, and then try to create a named builder from it, the error message is quite confusing:
Expected argument of type "string", "Samson\InvoiceBundle\Form\Type\PaymentTermsType" given (from the getType() method)
This PR checks for the right type at the relevant place
---------------------------------------------------------------------------
by stloyd at 2011/12/13 03:00:29 -0800
IMO you should add an test for this.
---------------------------------------------------------------------------
by Burgov at 2011/12/13 03:11:50 -0800
@stloyd done
---------------------------------------------------------------------------
by fabpot at 2011/12/13 03:27:08 -0800
@Burgov: Looks good to me. Can you squash your commits before I merge this PR? Thanks.
---------------------------------------------------------------------------
by Burgov at 2011/12/13 03:29:00 -0800
@fabpot done!