Fixed PHP error "Call to a member function implementsInterface() on a non-object"

I got this error when I called "app/console doctrine:generate:form"