title: How to deploy correctly when using Composer's develop / production switch?
body: <p>Composer has the option to load several dependencies only while being in development, so the tools will not be installed in production (on the live server). This is (in theory) very handy for scripts that only make sense in development, like tests, fake-data-tools, debugger, etc.</p>
  
  <p>The way to go is to add an additional <code>require-dev</code> block with the tools you need in dev:</p>
  
  <pre><code>"require-dev": {
      "codeception/codeception": "1.6.0.3"
  }
  </code></pre>
  
  <p>and then (theoretically) load these dependencies via</p>
  
  <pre><code>composer install --dev
  </code></pre>
  
  <h2>Problem &amp; Question:</h2>
  
  <p>Composer has changed the behaviour of <code>install</code> and <code>update</code> dramatically in 2013, <code>require-dev</code>-dependencies are now installed by default (!), feel free to create a composer.json with a <code>require-dev</code> block and perform an <code>composer install</code> to reproduce.</p>
  
  <p>As the most accepted way to deploy is to push the composer.<strong>lock</strong> (that holds your current composer setup) and then do an <code>composer install</code> on the production server, this will also install the development stuff.</p>
  
  <p>What's the correct way to deploy this <em>without</em> installing the -dev dependencies ?</p>
  
  <p><sub>Note: I'm trying to create a canonical Q/A here to clarify the weird Composer deployment. Feel free to edit this question.</sub></p>