title: Symfony 1.4 set default application for command line tasks
body: <p>I'm looking for a solution for the following problem:</p>
  
  <p>In a symfony 1.4 project, I have 2 applications: <code>frontend</code> and <code>backend</code>.
  Whenever I run a symfony cli task like <code>php symfony doctrine:build --all-classes</code>, symfony uses
  the <code>backend</code> application as default.</p>
  
  <p>How do I make symfony cli use <code>frontend</code> as the default application?</p>
  
  <p>I know i can run the same command as <code>php symfony --application=frontend doctrine:build --all-classes</code> but there must be a way to make it use the <code>frontend</code> app as default.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Found this method in <code>lib/vendor/symfony/lib/task/sfBaseTask.class.php</code></p>
  
  <pre><code>/**
   * Returns the first application in apps.
   *
   * @return string The Application name
   */
  protected function getFirstApplication()
  {
      if (count($dirs = sfFinder::type('dir')-&gt;maxdepth(0)-&gt;follow_link()-&gt;relative()-&gt;in(sfConfig::get('sf_apps_dir'))))
      {
          return $dirs[0];
      }
  
     return null;
  }
  </code></pre>
  
  <p>Seems the order is alphabetical ...</p>
  
  <p>Thanks.</p>