Symfony 2 FAQ

I recently started to work with symfony 2, a really nice PHP framework. Like Zend but with different concepts. While working with it I will line out some problems I had and solutions I found. This page will gradually be updated.

CLI says on doctrine:schema:create : No Metadata Classes to process.

If you’ve done everything following the documentation this error occurred because there is some inconsisty between the documentation and the implementation.The documentation says (for the PHP annotations) to put @ORMEntity tags in the docblock. The real syntax is @orm:Entity. This behaves the same for all the other tags too (@orm:Table, @orm:Id, …)

Thanks to Johannes Heinen for lining that out in his blog entry

edit: According to Symfony’s blog entry from 2 days ago the documentation is correct. So update to the new beta is necessary. If you stay before Beta 2 then my decription is for you.

InvalidConfigurationException: Unrecognized options “annotations” under “framework.validation”

You want to validate forms using annotation? The documentation says to enable validation for annotations in the config file. But there is a spelling mistake in the example code. The correct line is: