I had an entity class in Aib\\PlatformBundle\\Entity\\User.php
I had no problems trying to create its form class through
php app/ console doc
I resolved the same exception by deleting a conflicting autogenerated orm.php file in the bundle's Resources/config/doctrine folder; according to the documentation: "A bundle can accept only one metadata definition format. For example, it's not possible to mix YAML metadata definitions with annotated PHP entity class definitions."