PHP – Symfony – Build Model – No yml schema found
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.
- PHP – Doctrine – Soft Delete – Multiple Rows at a Time
- PHP – Doctrine – DQL – Select Subquery
- Symfony – Share Template Across Multiple Apps
- PHP – ZipArchive – 5.3.x – Weird Issue when Unlinking a File Just Added to Archive
- PHP – Symfony – Speed up CLI Commands – Do Not Load Web Plugins
- PHPUnit – You must not expect the generic exception class
- Symfony – Propel – Determine Propel Version
- PHP – Correctly Cast Numeric Strings to Numeric Datatypes
- PHP – Reflection Class – Determine Parent Method Signature
- CentOS – PHP – Install Memcached (with a d) Stack