Fixed PHP error "Call to a member function implementsInterface() on a no...

...n-object"

I got this error when I called "app/console doctrine:generate:form"