When trying to execute php symfony doctrine:generate-module frontend account Account I only got the following error (verbose output is at the end of this post.)
The "AccountForm" form only accepts a "Account" object.
This was driving me nuts. As it turns out it was all caused because I had a table named "form" in my database. Apparently this causes a classname conflict after code generation.
I revised my schema.yml to rename form to input_form and Form to InputForm.