Working on a new project which requires more complex user account functionality than the current sfDoctrineGuard provides and stumbled upon this error message when attempting to build the model: “No yml schema found in /tmp/doctrine_schema_81014.yml”. There were two issues I had, which after resolving, allowed me to build my model as expected.

First, I added some custom code to my ProjectConfiguration.class.php which will only load certain plugins based upon whether I was running symfony from the Command Line Interface (CLI) or not. For example, when running commands from CLI, I don’t want to load sfFormExtraPlugin or sfJqueryReloadedPlugin, so I had to make sure that my custom plugin was added to the array. You can view the code snippet here (demonstrative only, has no impact on problem outlined in article).

Second, I had the schema.yml located @ plugins/userPlugin/config/doctrine/schema.yml, a uri which Symfony is unaware of. To make symfony aware of the custom location for my config files, I had to add the following code to plugins/userPlugin/config/app.yml:

# plugins/userPlugin/config/app.yml
all:
  userPlugin:
    config_dir: %SF_PLUGINS_DIR%/userPlugin/config
    recursive: true

The important settings is the `recursive: true` setting. After resolving both issues I cleared cache and was able to successfully build the model.