symfony/symfony — pull request #2859 by Burgov (2011-12-13 10:58:03+00:00)
Title: Add error 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