<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stereo Interactive &#38; Design &#187; Symfony</title>
	<atom:link href="http://stereointeractive.com/blog/tag/symfony/feed/" rel="self" type="application/rss+xml" />
	<link>http://stereointeractive.com/blog</link>
	<description>Development Blog</description>
	<lastBuildDate>Wed, 07 Jul 2010 19:16:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>symfony forms: hide created_at, updated_at columns</title>
		<link>http://stereointeractive.com/blog/2010/04/07/symfony-forms-hide-created_at-updated_at-columns/</link>
		<comments>http://stereointeractive.com/blog/2010/04/07/symfony-forms-hide-created_at-updated_at-columns/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 22:40:53 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=504</guid>
		<description><![CDATA[There are a few different methods you can use if you&#8217;d like to hide created_at and updated_at columns from your generated forms.
The first way, and the easiest, is to simply unset the fields in your form class:


class SampleForm extends BaseSampleForm
&#123;   
  public function configure&#40;&#41;
  &#123;
    unset&#40;
   [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few different methods you can use if you&#8217;d like to hide created_at and updated_at columns from your generated forms.</p>
<p>The first way, and the easiest, is to simply unset the fields in your form class:<br />
<span id="more-504"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="kw2">class</span> SampleForm <span class="kw2">extends</span> BaseSampleForm
<span class="br0">&#123;</span>   
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="kw3">unset</span><span class="br0">&#40;</span>
      <span class="re0">$this</span><span class="br0">&#91;</span><span class="st_h">'created_at'</span><span class="br0">&#93;</span><span class="sy0">,</span>
      <span class="re0">$this</span><span class="br0">&#91;</span><span class="st_h">'updated_at'</span><span class="br0">&#93;</span>
    <span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

<p>If you want the values to display in your form as read-only:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="kw2">class</span> SampleForm <span class="kw2">extends</span> BaseSampleForm
<span class="br0">&#123;</span>   
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'created_at'</span><span class="br0">&#93;</span>    <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInput<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st_h">'readonly'</span><span class="sy0">=&gt;</span><span class="st_h">'readonly'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'updated_at'</span><span class="br0">&#93;</span>    <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInput<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st_h">'readonly'</span><span class="sy0">=&gt;</span><span class="st_h">'readonly'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2010/04/07/symfony-forms-hide-created_at-updated_at-columns/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Symfony 1.2 doctrine file upload in form</title>
		<link>http://stereointeractive.com/blog/2010/03/30/symfony-1-2-doctrine-file-upload-in-form/</link>
		<comments>http://stereointeractive.com/blog/2010/03/30/symfony-1-2-doctrine-file-upload-in-form/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 00:06:51 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Doctrine]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=497</guid>
		<description><![CDATA[Here are the required modifications for to a form class that contains a file upload field in symfony 1.2 using doctrine (and it probably works with propel, too).


class NewsletterForm extends BaseNewsletterForm
&#123;
  public function configure&#40;&#41;
  &#123;
    $this-&#62;widgetSchema&#91;'file'&#93; = new sfWidgetFormInputFileEditable&#40;array&#40;
      'file_src' =&#62; '/uploads/'.$this-&#62;getObject&#40;&#41;-&#62;getfile&#40;&#41;,
    [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the required modifications for to a form class that contains a file upload field in symfony 1.2 using doctrine (and it probably works with propel, too).<br />
<span id="more-497"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="kw2">class</span> NewsletterForm <span class="kw2">extends</span> BaseNewsletterForm
<span class="br0">&#123;</span>
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'file'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInputFileEditable<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span>
      <span class="st_h">'file_src'</span> <span class="sy0">=&gt;</span> <span class="st_h">'/uploads/'</span><span class="sy0">.</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">getObject</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">-&gt;</span><span class="me1">getfile</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">,</span>
      <span class="st_h">'is_image'</span>  <span class="sy0">=&gt;</span> <span class="kw4">true</span><span class="sy0">,</span>
      <span class="st_h">'edit_mode'</span> <span class="sy0">=&gt;</span> <span class="sy0">!</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">isNew</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">,</span>
      <span class="co1">//'template'  =&gt; '&lt;div&gt;%file%&lt;br /&gt;%input%&lt;br /&gt;%delete% %delete_label%&lt;/div&gt;',</span>
    <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">validatorSchema</span><span class="br0">&#91;</span><span class="st_h">'file'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfValidatorFile<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span>
      <span class="st_h">'required'</span> <span class="sy0">=&gt;</span> <span class="kw4">false</span><span class="sy0">,</span>
      <span class="st_h">'path'</span> <span class="sy0">=&gt;</span> sfConfig<span class="sy0">::</span><span class="me2">get</span><span class="br0">&#40;</span><span class="st_h">'sf_upload_dir'</span><span class="br0">&#41;</span>
    <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">validatorSchema</span><span class="br0">&#91;</span><span class="st_h">'file_delete'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfValidatorPass<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

<p>If you want to override the file name generated for your uploaded file, add a &#8216;generateXXXFileName()&#8217; method to your model&#8217;s class where XXX is the column name that contains the file name (in this example, our column is &#8220;file&#8221;, so the method name is &#8216;generateFileFilename&#8217;. It takes a single parameter, which is an instance of sfValidatedFile.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="kw2">class</span> Newsletter <span class="kw2">extends</span> BaseNewsletter
<span class="br0">&#123;</span>
  <span class="kw2">public</span> <span class="kw2">function</span> generateFileFileName<span class="br0">&#40;</span><span class="re0">$file</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="kw1">return</span> <span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getOriginalName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2010/03/30/symfony-1-2-doctrine-file-upload-in-form/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>symfony sync command configuration (with symfony 1.0)</title>
		<link>http://stereointeractive.com/blog/2010/03/22/symfony-sync-command-configuration-with-symfony-1-0/</link>
		<comments>http://stereointeractive.com/blog/2010/03/22/symfony-sync-command-configuration-with-symfony-1-0/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 10:18:57 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=467</guid>
		<description><![CDATA[I recently discovered a quick way to edit the rsync parameters used when executing the symfony sync command with symfony 1.0. 
I wanted to ignore timestamp and permissions differences, which wasn&#8217;t possible using the default configuration due to the -a (which stands for &#8216;archive&#8217; mode) parameter added to the rsync command. If you want to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently discovered a quick way to edit the rsync parameters used when executing the <code>symfony sync</code> command with symfony 1.0. <span id="more-467"></span></p>
<p>I wanted to ignore timestamp and permissions differences, which wasn&#8217;t possible using the default configuration due to the -a (which stands for &#8216;archive&#8217; mode) parameter added to the rsync command. If you want to override the default settings, all you have to do is add a &#8216;parameters&#8217; key to your properties.ini file. Here is an example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span class="br0">&#91;</span>staging<span class="br0">&#93;</span>
    host<span class="sy0">=</span>yourhostname
    port<span class="sy0">=</span><span class="nu0">22</span>
    user<span class="sy0">=</span>yourusername
    <span class="kw3">dir</span><span class="sy0">=</span>your<span class="sy0">/</span>path<span class="sy0">/</span>to<span class="sy0">/</span>your<span class="sy0">/</span>app
    parameters<span class="sy0">=</span><span class="st_h">'-rlDzC --force --delete --exclude-from=config/rsync_exclude.txt'</span></pre></div></div>

<p>Keep in mind if you set your own custom parameters you won&#8217;t benefit from any of the default settings so you should include them yourself (like &#8211;force, &#8211;delete, and your rsycn_exclude file).</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2010/03/22/symfony-sync-command-configuration-with-symfony-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>symfony 1.0 migrations</title>
		<link>http://stereointeractive.com/blog/2010/02/23/symfony-1-0-migrations/</link>
		<comments>http://stereointeractive.com/blog/2010/02/23/symfony-1-0-migrations/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 14:11:30 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=431</guid>
		<description><![CDATA[I&#8217;m working on a plugin for symfony 1.0 and am really enjoying this workflow. Yes, symfony 1.0 is 4 versions old and should not be used for new projects. 
With the help of the sfPropelMigrationsLightPlugin plugin, one of my favorites, I have been rapidly making changes to my plugin schema and adding new data to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a plugin for symfony 1.0 and am really enjoying this workflow. Yes, symfony 1.0 is 4 versions old and should not be used for new projects. </p>
<p>With the help of the <a href='http://www.symfony-project.org/plugins/sfPropelMigrationsLightPlugin'>sfPropelMigrationsLightPlugin</a> plugin, one of my favorites, I have been rapidly making changes to my plugin schema and adding new data to the database over and over again while I mock things up.</p>
<p>Here is the workflow:<br />
<span id="more-431"></span><br />
1. make changes to the plugin&#8217;s schema.yml file, in plugins/myPlugin/config/schema.yml<br />
2. make changes to the plugin&#8217;s fixtures file, in plugins/myPlugin/data/fixtures/fixtures.yml<br />
3. rebuild the model<br />
4. rebuild the sql<br />
5. copy the plugin&#8217;s sql to the migration sql source file<br />
6. run the migration<br />
7. load the fixtures</p>
<p>This gives me my new schema and populates it with whatever data I have in the fixtures.</p>
<p>Optionally, if I want to go back and make another change, I migrate down a version first, then run through the process above.</p>
<p>The trick is to make your migration run an external SQL file, and to use the plugin&#8217;s generated SQL as the source for that migration.</p>
<p>Here is my migration (remember this uses the sfMigrationsLightPlugin):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="kw2">&lt;?php</span>
&nbsp;
<span class="co4">/**
 * Migrations between versions 033 and 034.
 */</span>
<span class="kw2">class</span> Migration034 <span class="kw2">extends</span> sfMigration
<span class="br0">&#123;</span>
  <span class="co4">/**
   * Migrate up to version 034.
   */</span>
  <span class="kw2">public</span> <span class="kw2">function</span> up<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">loadSql</span><span class="br0">&#40;</span><span class="kw3">dirname</span><span class="br0">&#40;</span><span class="kw4">__FILE__</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">'/034_stDataflow.sql'</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
&nbsp;
  <span class="co4">/**
   * Migrate down to version 033.
   */</span>
  <span class="kw2">public</span> <span class="kw2">function</span> down<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;SET FOREIGN_KEY_CHECKS = 0;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;DROP TABLE IF EXISTS `dataflow_import_map`;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;DROP TABLE IF EXISTS `dataflow_profile_history`;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;DROP TABLE IF EXISTS `dataflow_batch_import`;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;DROP TABLE IF EXISTS `dataflow_batch`;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;DROP TABLE IF EXISTS `dataflow_profile`;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">executeSQL</span><span class="br0">&#40;</span><span class="st0">&quot;SET FOREIGN_KEY_CHECKS = 1;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div></div>

<p>Here&#8217;s how I run it, once I have completed my new schema.yml and fixtures.yml changes.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="co0"># if this is not the first time I'm going through this process, </span>
<span class="co0"># I need to migrate back a step to remove my old plugin tables</span>
.<span class="sy0">/</span>symfony migrate myapp:dev <span class="nu0">33</span>  <span class="co0">#33 is my previous migration number</span>
<span class="sy0">&gt;&gt;</span> migrations migrated <span class="nu0">1</span> step<span class="br0">&#40;</span>s<span class="br0">&#41;</span>
<span class="sy0">&gt;&gt;</span> migrations current database version: <span class="nu0">33</span>
$ .<span class="sy0">/</span>symfony propel-build-model
<span class="kw2">cp</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>plugins.stDataflowPlugin.lib.model.schema.sql data<span class="sy0">/</span>migrations<span class="sy0">/</span>034_stDataflow.sql
.<span class="sy0">/</span>symfony migrate npas:dev <span class="nu0">34</span>
<span class="sy0">&gt;&gt;</span> migrations migrated <span class="nu0">1</span> step<span class="br0">&#40;</span>s<span class="br0">&#41;</span>
<span class="sy0">&gt;&gt;</span> migrations current database version: <span class="nu0">34</span>
.<span class="sy0">/</span>symfony propel-load-data npas dev plugins<span class="sy0">/</span>stDataflowPlugin<span class="sy0">/</span>data<span class="sy0">/</span>fixtures<span class="sy0">/</span>fixtures.yml
<span class="sy0">&gt;&gt;</span> propel    load data from <span class="st0">&quot;plugins/stDataf...gin/data/fixtures/fixtures.yml&quot;</span></pre></div></div>

<p>It&#8217;s nothing novel, but a good example of using the tools to improve the workflow.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2010/02/23/symfony-1-0-migrations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Symfony Resource Reference Guide</title>
		<link>http://stereointeractive.com/blog/2010/02/21/symfony-resource-reference-guide/</link>
		<comments>http://stereointeractive.com/blog/2010/02/21/symfony-resource-reference-guide/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 21:54:28 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=415</guid>
		<description><![CDATA[Symfony has a ton of documentation available online. The only problem is, with so many different versions (1.0 &#8211; 1.4) in the wild, it can be hard to locate exactly the right resource when you need it. Below is a simple and straightforward list of the most useful documentation:

Jump to the By Format or By [...]]]></description>
			<content:encoded><![CDATA[<p>Symfony has a ton of documentation available online. The only problem is, with so many different versions (1.0 &#8211; 1.4) in the wild, it can be hard to locate exactly the right resource when you need it. Below is a simple and straightforward list of the most useful documentation:</p>
<p><span id="more-415"></span></p>
<p>Jump to the <a href="#format">By Format</a> or <a href="#version">By Version</a>.</p>
<p><strong>By Format:</strong><a name="format"></a></p>
<ul>
<li>Getting Started:
<ul>
<li><a href="http://www.symfony-project.org/getting-started/1_4/en/">Getting Started (1.4)</a></li>
<li><a href="http://www.symfony-project.org/getting-started/1_2/en/">Getting Started (1.2)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_2/en/my-first-project">My First Project (1.2)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_0/en/my-first-project">My First Project (1.0)</a></li>
</ul>
</li>
<li>Tutorials (Jobeet / Askeet / Cookbook)
<ul>
<li><a href="http://www.symfony-project.org/jobeet/1_4/Propel/en/">Jobeet (1.4, Propel)</a></li>
<li><a href="http://www.symfony-project.org/jobeet/1_4/Doctrine/en/">Jobeet (1.4, Doctrine)</a></li>
<li><a href="http://www.symfony-project.org/jobeet/1_2/Propel/en/">Jobeet (1.2, Propel)</a></li>
<li><a href="http://www.symfony-project.org/jobeet/1_2/Doctrine/en/ ">Jobeet (1.2, Doctrine)</a></li>
<li><a href="http://www.symfony-project.org/askeet/1_0/en/">Askeet (1.0)</a></li>
<li><a href="http://www.symfony-project.org/more-with-symfony/1_4/en/">More with symfony / advanced tutorials (1.4)</a></li>
<li><a href="http://www.symfony-project.org/cookbook/1_2/en/">Cookbook (1.2)</a></li>
<li><a href="http://www.symfony-project.org/cookbook/1_0/en/">Cookbook (1.0)</a></li>
</ul>
</li>
<li>&#8220;The Book&#8221;:
<ul>
<li><a href="http://www.symfony-project.org/book/1_2/">The Definitive Guide to symfony (1.2)</a></li>
<li><a href="http://www.symfony-project.org/book/1_0/">The Definitive Guide to symfony (1.0)</a></li>
</ul>
</li>
<li>Reference Guide (configuration, events, tasks):
<ul>
<li><a href="http://www.symfony-project.org/reference/1_4/en/">symfony Reference Guide (1.4)</a></li>
<li><a href="http://www.symfony-project.org/reference/1_2/en/">symfony Reference Guide (1.2)</a></li>
</ul>
</li>
<li>Admin Generator:
<ul>
<li><a href="http://www.symfony-project.org/book/1_2/14-Generators#Administration">Admin Generator (1.2)</a></li>
<li><a href="http://www.symfony-project.org/book/1_0/14-Generators#Administration">Admin Generator (1.0)</a></li>
</ul>
</li>
<li>Forms:
<ul>
<li><a href="http://www.symfony-project.org/forms/1_4/en/">symfony Forms in Action</a></li>
<li><a href="http://www.symfony-project.org/forms/1_2/en/">symfony Forms (1.2)</a></li>
</ul>
</li>
<li>API:
<ul>
<li><a href="http://www.symfony-project.org/api/1_4/">API (1.4)</a></li>
<li><a href="http://www.symfony-project.org/api/1_2/">API (1.2)</a></li>
<li><a href="http://www.symfony-project.org/api/1_0/">API (1.0)</a></li>
</ul>
</li>
<li>Installing/Upgrading:
<ul>
<li><a href="http://www.symfony-project.org/tutorial/1_4/en/upgrade">Upgrade (1.4)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_2/upgrade">Upgrade (1.2)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_4">Installation (1.4)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_2">Installation (1.2)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_0">Installation (1.0)</a></li>
</ul>
</li>
<li>What&#8217;s New:
<ul>
<li><a href="http://www.symfony-project.org/tutorial/1_4/en/upgrade">What&#8217;s New (1.4)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_2/en/whats-new">What&#8217;s New (1.2)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_4/en/deprecated">Deprecated (1.4)</a></li>
</ul>
</li>
</ul>
<p><strong>By Version:</strong><a name="version"></a></p>
<ul>
<li>Symfony 1.3/1.4
<ul>
<li><a href="http://www.symfony-project.org/getting-started/1_4/en/">Getting Started (1.4)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_4/en/whats-new">What&#8217;s New (1.4)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_4/en/upgrade">Upgrade (1.4)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_4/en/deprecated">Deprecated (1.4)</a></li>
<li><a href="http://www.symfony-project.org/jobeet/1_4/Doctrine/en/">Jobeet (1.4, Propel)</a></li>
<li><a href="http://www.symfony-project.org/jobeet/1_4/Propel/en/">Jobeet (1.4, Doctrine)</a></li>
<li><a href="http://www.symfony-project.org/reference/1_4/en/">symfony Reference Guide (1.4)</a></li>
<li><a href="http://www.symfony-project.org/more-with-symfony/1_4/en/">More with symfony / advanced tutorials (1.4)</a></li>
<li><a href="http://www.symfony-project.org/api/1_4/">API (1.4)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_4">Installation (1.4)</a></li>
</ul>
</li>
<li>Symfony 1.2
<ul>
<li><a href="http://www.symfony-project.org/jobeet/1_2/Propel/en/">Jobeet (1.2, Propel)</a></li>
<li><a href="http://www.symfony-project.org/jobeet/1_2/Doctrine/en/ ">Jobeet (1.2, Doctrine)</a></li>
<li><a href="http://www.symfony-project.org/reference/1_2/en/">symfony Reference Guide (1.2)</a></li>
<li><a href="http://www.symfony-project.org/book/1_2/">The Definitive Guide to symfony (1.2)</a></li>
<li><a href="http://www.symfony-project.org/forms/1_2/en/">symfony Forms (1.2)</a></li>
<li><a href="http://www.symfony-project.org/cookbook/1_2/en/">Cookbook (1.2)</a></li>
<li><a href="http://www.symfony-project.org/api/1_2/">API (1.2)</a></li>
<li><a href="http://www.symfony-project.org/getting-started/1_2/en/">Getting Started (1.2)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_2/en/whats-new">What&#8217;s New (1.2)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_2/en/my-first-project">My First Project (1.2)</a></li>
<li><a href="http://www.symfony-project.org/book/1_2/14-Generators#Administration">Admin Generator (1.2)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_2">Installation (1.2)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_2/upgrade">Upgrade (1.2)</a></li>
</ul>
</li>
<li>Symfony 1.0
<ul>
<li><a href="http://www.symfony-project.org/book/1_0/">The Definitive Guide to symfony (1.0)</a></li>
<li><a href="http://www.symfony-project.org/cookbook/1_0/en/">Cookbook (1.0)</a></li>
<li><a href="http://www.symfony-project.org/api/1_0/">API (1.0)</a></li>
<li><a href="http://www.symfony-project.org/tutorial/1_0/en/my-first-project">My First Project (1.0)</a></li>
<li><a href="http://www.symfony-project.org/askeet/1_0/en/">Askeet (1.0)</a></li>
<li><a href="http://www.symfony-project.org/cookbook/1_0/en/">Cookbook (1.0)</a></li>
<li><a href="http://www.symfony-project.org/book/1_0/14-Generators#Administration">Admin Generator (1.0)</a></li>
<li><a href="http://www.symfony-project.org/installation/1_0">Installation (1.0)</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2010/02/21/symfony-resource-reference-guide/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Symfony Experts</title>
		<link>http://stereointeractive.com/blog/2010/02/21/symfony-experts/</link>
		<comments>http://stereointeractive.com/blog/2010/02/21/symfony-experts/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 20:37:46 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=409</guid>
		<description><![CDATA[Two good friends of mine just launched a new site dedicated to providing professional help to symfony developers.
Symfony Experts.
The site is very well designed and will prove to be a valuable resource for developers of all skill levels — experts can make some extra money sharing their expertise, and beginners (or experts encountering a new [...]]]></description>
			<content:encoded><![CDATA[<p>Two good friends of mine just launched a new site dedicated to providing professional help to symfony developers.</p>
<p><a href='http://www.symfonyexperts.com/'>Symfony Experts</a>.</p>
<p>The site is very well designed and will prove to be a valuable resource for developers of all skill levels — experts can make some extra money sharing their expertise, and beginners (or experts encountering a new problem) can get quick and succinct answers to their questions.<br />
<span id="more-409"></span></p>
<p>From the about page:</p>
<blockquote><p>
Symfony Experts is problem-solving community for Symfony, ideal for users seeking quick, succinct answers they can&#8217;t find in any Symfony forums. Symfony Experts is also great for established Symfony developers who want to help problem-solve and be paid fairly for their efforts.
</p></blockquote>
<p>I highly recommend it. </p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2010/02/21/symfony-experts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Could not create database for c&#8230;o use near&#8221; error with Doctrine / Symfony</title>
		<link>http://stereointeractive.com/blog/2009/12/31/could-not-create-database-for-c-o-use-near-error-with-doctrine-symfony/</link>
		<comments>http://stereointeractive.com/blog/2009/12/31/could-not-create-database-for-c-o-use-near-error-with-doctrine-symfony/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 22:44:40 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Doctrine]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=386</guid>
		<description><![CDATA[I was trying to use the symfony command line tools to rebuild my test database and I couldn&#8217;t get past this error:

&#62;&#62; doctrine Could not create database for c...o use near '-sb-test' at line 1

Turns out the issue is with the &#8220;-&#8221; in my test database name. Replacing the hyphens with underscores fixed the problem. [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to use the symfony command line tools to rebuild my test database and I couldn&#8217;t get past this error:<span id="more-386"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="sy0">&gt;&gt;</span> doctrine Could not create database <span class="kw1">for</span> c...o use near <span class="st_h">'-sb-test'</span> at line <span class="nu0">1</span></pre></div></div>

<p>Turns out the issue is with the &#8220;-&#8221; in my test database name. Replacing the hyphens with underscores fixed the problem. </p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/12/31/could-not-create-database-for-c-o-use-near-error-with-doctrine-symfony/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Symfony, Doctrine Upload File &#8220;validation failed&#8221;</title>
		<link>http://stereointeractive.com/blog/2009/10/04/symfony-doctrine-upload-file-validation-failed/</link>
		<comments>http://stereointeractive.com/blog/2009/10/04/symfony-doctrine-upload-file-validation-failed/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 05:19:49 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=335</guid>
		<description><![CDATA[After setting up a simple file upload using the symfony 1.2 forms class and a doctrine model, I hit this error right away:

500 &#124; Internal Server Error &#124; Doctrine_Validator_Exception
 1 field had validation error:
 * 1 validator failed on file &#40;type&#41;

The short solution: when using a doctrine form class and $form->save(), set the path option [...]]]></description>
			<content:encoded><![CDATA[<p>After setting up a simple file upload using the symfony 1.2 forms class and a doctrine model, I hit this error right away:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="nu0">500</span> <span class="sy0">|</span> Internal Server Error <span class="sy0">|</span> Doctrine_Validator_Exception
 <span class="nu0">1</span> field had validation error:
 <span class="sy0">*</span> <span class="nu0">1</span> validator failed on <span class="kw2">file</span> <span class="br0">&#40;</span><span class="kw3">type</span><span class="br0">&#41;</span></pre></div></div>

<p><strong>The short solution: when using a doctrine form class and $form->save(), set the path option in your sfValidatorFile validator and do not attempt to save/set the file column yourself.</strong> If you are curious why this is, continue reading.<span id="more-335"></span></p>
<p>What was particularly strange about this error is that the &#8220;file&#8221; column in my model was defined as a string, and I was certain I was setting this column by hand to the file name (a string) of the uploaded file. Hmm&#8230; this shouldn&#8217;t trigger an error, should it? This following is what <strong>did not work</strong>. I used the documentation for sfValidatorFile() found in the<a href="http://www.symfony-project.org/forms/1_2/en/02-Form-Validation#chapter_02_file_upload"> symfony Forms book</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="co1">// my form</span>
<span class="kw2">class</span> ArtistForm <span class="kw2">extends</span> BaseArtistForm
<span class="br0">&#123;</span>
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'file'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInputFile<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">validatorSchema</span><span class="br0">&#91;</span><span class="st_h">'file'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfValidatorFile<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span>
      <span class="st_h">'required'</span> <span class="sy0">=&gt;</span> <span class="kw4">false</span><span class="sy0">,</span> <span class="st_h">'mime_types'</span> <span class="sy0">=&gt;</span> <span class="st_h">'web_images'</span>
    <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="co1">// my action ***did not work***</span>
<span class="kw2">public</span> <span class="kw2">function</span> executeForm<span class="br0">&#40;</span>sfWebRequest <span class="re0">$request</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span> <span class="sy0">=</span> <span class="kw2">new</span> ArtistForm<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">isMethod</span><span class="br0">&#40;</span><span class="st_h">'post'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
      <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">bind</span><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getParameter</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getFiles</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">isValid</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
      <span class="br0">&#123;</span>
        <span class="re0">$file</span> <span class="sy0">=</span> <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">getValue</span><span class="br0">&#40;</span><span class="st_h">'file'</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$file</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
          <span class="re0">$filename</span> <span class="sy0">=</span> <span class="kw3">sha1</span><span class="br0">&#40;</span><span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getOriginalName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
          <span class="re0">$extension</span> <span class="sy0">=</span> <span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getExtension</span><span class="br0">&#40;</span><span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getOriginalExtension</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
          <span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="br0">&#40;</span>sfConfig<span class="sy0">::</span><span class="me2">get</span><span class="br0">&#40;</span><span class="st_h">'sf_upload_dir'</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">'/'</span><span class="sy0">.</span><span class="re0">$filename</span><span class="sy0">.</span><span class="re0">$extension</span><span class="br0">&#41;</span><span class="sy0">;</span>          
          <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">getObject</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">-&gt;</span><span class="me1">setFile</span><span class="br0">&#40;</span><span class="re0">$filename</span><span class="sy0">.</span><span class="re0">$extension</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="br0">&#125;</span>
&nbsp;
        <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>    
  <span class="br0">&#125;</span></pre></div></div>

<p>Anytime I&#8217;d try to upload a file, I&#8217;d get the dreaded &#8220;Doctrine_Validator_Exception&#8221;, &#8220;validator failed on file (type)&#8221; message. After some serious googling, I came up with a few links (listed at the bottom of this post) that eventually led me to the solution. The issues boils down to this:</p>
<ul>
<li>When using the sfValidatorFile widget in your form, retrieving that value from your form returns an sfValidatedFile object</li>
<li>Doctrine forms will automatically try to process and save uploaded files, so you do not need to do this manually in your action if you call $form->save() and your form contains an instance of sfValidatorFile</li>
<li>The automatic save mechanism in your doctrine form <strong>will fail</strong> if you do not define a path in your sfValidatorFile validator. This is because if no path is defined in your validator, <strong>the validator returns an instance of sfValidatedFile</strong> and calling $form->save() will result in trying to update your doctrine object with this sfValidatorFile instance, resulting in an error.</li>
<li>If a path is defined in your sfValidatorFile validator, the bound form value for your file input field is set to the full path to saved file rather than an sfValidatedFile instance, allowing your doctrine object to be saved.</li>
</ul>
<p>Now, with a deeper understanding of how this is all put together, we can update our action:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="co1">// doctrine form class</span>
<span class="kw2">class</span> ArtistForm <span class="kw2">extends</span> BaseArtistForm
<span class="br0">&#123;</span>
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'photo'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInputFile<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">validatorSchema</span><span class="br0">&#91;</span><span class="st_h">'photo'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfValidatorFile<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span>
      <span class="st_h">'required'</span> <span class="sy0">=&gt;</span> <span class="kw4">false</span><span class="sy0">,</span> <span class="st_h">'mime_types'</span> <span class="sy0">=&gt;</span> <span class="st_h">'web_images'</span><span class="sy0">,</span>
      <span class="st_h">'path'</span> <span class="sy0">=&gt;</span> sfConfig<span class="sy0">::</span><span class="me2">get</span><span class="br0">&#40;</span><span class="st_h">'sf_upload_dir'</span><span class="br0">&#41;</span>
    <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="co1">// the action</span>
  <span class="kw2">public</span> <span class="kw2">function</span> executeForm<span class="br0">&#40;</span>sfWebRequest <span class="re0">$request</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span> <span class="sy0">=</span> <span class="kw2">new</span> ArtistForm<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">isMethod</span><span class="br0">&#40;</span><span class="st_h">'post'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
      <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">bind</span><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getParameter</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getFiles</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">isValid</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
      <span class="br0">&#123;</span>
        <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>    
  <span class="br0">&#125;</span></pre></div></div>

<p>More about this issue in the forums and mailing list:</p>
<ul>
<li><a href="http://forum.symfony-project.org/index.php/m/74831/">http://forum.symfony-project.org/index.php/m/74831/</a></li>
<li><a href="http://groups.google.com/group/symfony-users/browse_thread/thread/668a44a52a775938/3d55c8bb40290dbe?show_docid=3d55c8bb40290dbe">http://groups.google.com/group/symfony-users/browse_thread/thread/668a44a52a775938/3d55c8bb40290dbe?show_docid=3d55c8bb40290dbe</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/10/04/symfony-doctrine-upload-file-validation-failed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speedup: Profile your symfony app using Xdebug &#8211; Web Mozarts</title>
		<link>http://stereointeractive.com/blog/2009/08/24/speedup-profile-your-symfony-app-using-xdebug-web-mozarts/</link>
		<comments>http://stereointeractive.com/blog/2009/08/24/speedup-profile-your-symfony-app-using-xdebug-web-mozarts/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 16:28:10 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=313</guid>
		<description><![CDATA[Speedup: Profile your symfony app using Xdebug &#8211; Web Mozarts.
Haven&#8217;t tried this but hope to, soon!
]]></description>
			<content:encoded><![CDATA[<p><a href='http://webmozarts.com/2009/05/01/speedup-performance-profiling-for-your-symfony-app/'>Speedup: Profile your symfony app using Xdebug &#8211; Web Mozarts</a>.</p>
<p>Haven&#8217;t tried this but hope to, soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/24/speedup-profile-your-symfony-app-using-xdebug-web-mozarts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a new developer started on an existing symfony project</title>
		<link>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/</link>
		<comments>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 17:24:20 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=305</guid>
		<description><![CDATA[Here is the basic process we use to get a new developer started on a symfony project. This flow assumes you already have created your symfony project and it checked into an svn repository somewhere, and that the developer is on a mac. 
1. Checkout code from SVN into your ~/Sites folder. From the command [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the basic process we use to get a new developer started on a symfony project. This flow assumes you already have created your symfony project and it checked into an svn repository somewhere, and that the developer is on a mac. <span id="more-305"></span></p>
<p>1. Checkout code from SVN into your ~/Sites folder. From the command line do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> <span class="kw2">co</span> <span class="br0">&#91;</span>path to repository<span class="br0">&#93;</span> ~<span class="sy0">/</span>Sites<span class="sy0">/</span><span class="br0">&#91;</span>projectname<span class="br0">&#93;</span> <span class="re5">--username</span> <span class="br0">&#91;</span>username<span class="br0">&#93;</span></pre></div></div>

<p>After the checkout, go into your new [projectname] directory and do a fix permissions:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span class="sy0">/</span>symfony fix-perms</pre></div></div>

<p>2. Create a new virtual host in apache. You can skip this step but I find it makes things easier. My entry in my apache .conf file (on my mac its located at /etc/apache2/users/[username].conf where [username] is the username on my mac) looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="sy0">&lt;</span>VirtualHost <span class="sy0">*</span>:<span class="nu0">80</span><span class="sy0">&gt;</span>
	ServerName <span class="br0">&#91;</span>projectname<span class="br0">&#93;</span>.local
	DocumentRoot <span class="sy0">/</span>Users<span class="sy0">/</span><span class="br0">&#91;</span>myusername<span class="br0">&#93;</span><span class="sy0">/</span>Sites<span class="sy0">/</span><span class="br0">&#91;</span>projectname<span class="br0">&#93;</span><span class="sy0">/</span>web
<span class="sy0">&lt;/</span>VirtualHost<span class="sy0">&gt;</span></pre></div></div>

<p>I also have add this new domain to my local hosts file at /etc/hosts:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1   <span class="br0">&#91;</span>projectname<span class="br0">&#93;</span>.local</pre></div></div>

<p>then i restart my webserver with a &#8220;sudo apachectl graceful&#8221;.</p>
<p>3. set up your local database. On my mac I use Sequel Pro to create the database. I run a..</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span class="sy0">/</span>symfony propel-build-all</pre></div></div>

<p>..to regenerate the sql and base model classes. Often I don&#8217;t like to commit auto-generated code to svn but rather just the source files from which the new code is generated (you can read the side bar &#8220;Best Practice: Checkin all the canonical stuff, and nothing else&#8221; with one view on this at http://www.ericsink.com/scm/scm_repositories.html).</p>
<p>Once that is done, normally I would insert the db schema into my new database, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root <span class="br0">&#91;</span>dbname<span class="br0">&#93;</span> <span class="sy0">&lt;</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>lib.model.schema.sql</pre></div></div>

<p>&#8230; but sometimes I want to use a lot of the same basic data from before, so I insert database dump that has actual content:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root <span class="br0">&#91;</span>dbname<span class="br0">&#93;</span> <span class="sy0">&lt;</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>latest.sql</pre></div></div>

<p>4. configure the symfony project to use your new db. You&#8217;ll have to copy the config/databases.yml-dist to database.yml and add your own settings there. The databases.yml file is ignored in our repository, so that way the devs can keep different local configuration settings for our dev environment without having to create lots of different symfony environments (usually I keep them to just dev, stage, production) in the project.</p>
<p>5. load up http://[projectname].local/frontend_dev.php to see if things are working!</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
