title: proper way to deploy symfony project with composer
body: <p>We have git hook to deploy new branches (or update old ones) for symfony 2 project to the dev server. <code>composer.lock</code> is added to git repository so that <code>composer install</code> would install same version of vendor libs. <code>/app/bootstrap.php.cache</code> is not included in git rep.</p>
  <p>Hook steps:</p>
  <ol>
  <li>composer install</li>
  <li>./app/console doctrine:migrations:migrate --no-interaction</li>
  <li>clear cache</li>
  </ol>
  <h1>Problem</h1>
  <p>If there are database problems (changed database schema, login credentials are not working etc.) <code>composer install</code> fails on `Updating the &quot;app/config/parameters.yml&quot; file.<br />
  If switch 1-2 steps and run migrations first it would not run because vendor libs must be installed first.</p>
  <h1>Question</h1>
  <p>How should I deploy app properly?</p>